summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/modules/module-udev-detect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c
index 1b1e9c1a..7508d9a7 100644
--- a/src/modules/module-udev-detect.c
+++ b/src/modules/module-udev-detect.c
@@ -416,8 +416,10 @@ static void monitor_cb(
goto fail;
}
- if (!path_get_card_id(udev_device_get_devpath(dev)))
+ if (!path_get_card_id(udev_device_get_devpath(dev))) {
+ udev_device_unref(dev);
return;
+ }
process_device(u, dev);
udev_device_unref(dev);