diff --git a/udev_list.c b/udev_list.c index 4c00023..0696468 100644 --- a/udev_list.c +++ b/udev_list.c @@ -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; }