about summary refs log tree commit homepage
path: root/svc_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'svc_dev.c')
-rw-r--r--svc_dev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/svc_dev.c b/svc_dev.c
index b2beec3..b6a1e71 100644
--- a/svc_dev.c
+++ b/svc_dev.c
@@ -129,7 +129,10 @@ static int svc_scandev(struct mog_svc *svc, unsigned *nr, mog_scandev_cb cb)
 
                 switch (hash_insert_if_absent(devhash, dev, NULL)) {
                 case 0:
-                        free(dev);
+                        /* do not free dev, it is in svc->by_mog_devid */
+                        syslog(LOG_ERR,
+                               "%s/%s seen twice in readdir (BUG?)",
+                               svc->docroot, ent->d_name);
                         break;
                 case 1:
                         (*nr)++;