efivars: don't crash when somebody wants to remove an efi variable

This corrects b3c908b4a2 by allowing a
NULL value again for variable deletion.

Fixes: #6753
This commit is contained in:
Lennart Poettering
2017-09-08 17:34:11 +02:00
parent 8cc7661dc5
commit e1e26566ec

View File

@@ -269,7 +269,7 @@ int efi_set_variable(
_cleanup_close_ int fd = -1;
assert(name);
assert(value);
assert(value || size == 0);
if (asprintf(&p,
"/sys/firmware/efi/efivars/%s-%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",