1
0
Fork 0

check NULL

This commit is contained in:
illiliti 2020-07-31 00:08:37 +03:00
parent 760346ed08
commit a0528c5585

View file

@ -125,6 +125,10 @@ struct udev_device *udev_device_get_parent(struct udev_device *udev_device)
path = strdup(udev_device_get_syspath(udev_device));
if (!path) {
return NULL;
}
do {
if ((tmp = strrchr(path, '/'))) {
*tmp = '\0';