check NULL

This commit is contained in:
illiliti
2020-07-09 15:43:09 +03:00
parent a686cc2b22
commit 9c3df3e390

View File

@@ -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;
}