summaryrefslogtreecommitdiff
path: root/src/lib/eeze
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-12-14 07:31:39 -0500
committerChris Michael <cp.michael@samsung.com>2017-12-14 07:31:39 -0500
commit5f7d942253afadb6e0623fe6561fc03f000bc1ea (patch)
treeef39c45e7eded2d3de57c0a83c12bf0bc69ff56a /src/lib/eeze
parentd29f01e5ee53dac79f2685996a9958ef88e38b98 (diff)
eeze: Don't leak udev enumeration
If we cannot create a new udev device, then we should free the previously created udev enumeration from above. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/eeze')
-rw-r--r--src/lib/eeze/eeze_udev_find.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/eeze/eeze_udev_find.c b/src/lib/eeze/eeze_udev_find.c
index b96e5f33b9..35cdbe83c5 100644
--- a/src/lib/eeze/eeze_udev_find.c
+++ b/src/lib/eeze/eeze_udev_find.c
@@ -28,7 +28,10 @@ eeze_udev_find_similar_from_syspath(const char *syspath)
28 return NULL; 28 return NULL;
29 29
30 if (!(device = _new_device(syspath))) 30 if (!(device = _new_device(syspath)))
31 return NULL; 31 {
32 udev_enumerate_unref(en);
33 return NULL;
34 }
32 35
33 vendor = udev_device_get_property_value(device, "ID_VENDOR_ID"); 36 vendor = udev_device_get_property_value(device, "ID_VENDOR_ID");
34 37