]> code.delx.au - pulseaudio/commitdiff
udev: don't forget to unref devices we are not interested in
authorLennart Poettering <lennart@poettering.net>
Tue, 12 Jan 2010 22:01:24 +0000 (23:01 +0100)
committerColin Guthrie <cguthrie@mandriva.org>
Tue, 9 Feb 2010 22:31:18 +0000 (22:31 +0000)
https://bugzilla.redhat.com/show_bug.cgi?id=552932

src/modules/module-udev-detect.c

index f17695b310c7dbb5ec9a0776cbcc55e6bd430635..dfd13ee23c4111b93f6525b843f9f03192c89bbf 100644 (file)
@@ -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);