check NULL
This commit is contained in:
parent
a686cc2b22
commit
9c3df3e390
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ struct udev_list_entry *udev_list_entry_add(struct udev_list_entry *list_entry,
|
|||
}
|
||||
|
||||
free(old->value);
|
||||
old->value = strdup(value);
|
||||
old->value = value ? strdup(value) : NULL;
|
||||
return old;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue