forked from enlightenment/efl
eeze: fix a potention memory leak
Summary: if udev device get parents fails, memory leaks. this patch fixes the problem. Reviewers: raster, Hermet, jsuya, herb, ali.alzyod, devilhorns Reviewed By: ali.alzyod, devilhorns Subscribers: ali.alzyod, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12249
This commit is contained in:
parent
17137316ee
commit
ccf77acc22
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue