parent
caaa021290
commit
7265d305c2
2 changed files with 5 additions and 0 deletions
|
|
@ -546,12 +546,14 @@ struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char *
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!realpath(syspath, path)) {
|
if (!realpath(syspath, path)) {
|
||||||
|
free(subsystem);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
udev_device = calloc(1, sizeof(*udev_device));
|
udev_device = calloc(1, sizeof(*udev_device));
|
||||||
|
|
||||||
if (!udev_device) {
|
if (!udev_device) {
|
||||||
|
free(subsystem);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ struct udev_list_entry *udev_list_entry_add(struct udev_list_entry *list_entry,
|
||||||
list_entry2->name = strdup(name);
|
list_entry2->name = strdup(name);
|
||||||
|
|
||||||
if (!list_entry2->name) {
|
if (!list_entry2->name) {
|
||||||
|
free(list_entry2);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,6 +86,8 @@ struct udev_list_entry *udev_list_entry_add(struct udev_list_entry *list_entry,
|
||||||
list_entry2->value = strdup(value);
|
list_entry2->value = strdup(value);
|
||||||
|
|
||||||
if (!list_entry2->value) {
|
if (!list_entry2->value) {
|
||||||
|
free(list_entry2->name);
|
||||||
|
free(list_entry2);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue