fix memory leak
This commit is contained in:
parent
d2820abf13
commit
089e09e00a
1 changed files with 4 additions and 0 deletions
|
|
@ -86,6 +86,10 @@ struct udev_device *udev_device_get_parent(struct udev_device *udev_device)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (udev_device->parent) {
|
||||
return udev_device->parent;
|
||||
}
|
||||
|
||||
syspath = strdup(udev_device_get_syspath(udev_device));
|
||||
|
||||
if (!syspath) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue