diff options
-rw-r--r-- | src/lib/eeze/eeze_udev_syspath.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/eeze/eeze_udev_syspath.c b/src/lib/eeze/eeze_udev_syspath.c index 87b2c0fa78..4d2a5c237a 100644 --- a/src/lib/eeze/eeze_udev_syspath.c +++ b/src/lib/eeze/eeze_udev_syspath.c @@ -53,7 +53,10 @@ eeze_udev_syspath_get_parents(const char *syspath) return NULL; if (!(parent = udev_device_get_parent(device))) - return NULL; + { + udev_device_unref(device); + return NULL; + } for (; parent; child = parent, parent = udev_device_get_parent(child)) { |