From: Lennart Poettering Date: Fri, 8 Sep 2017 15:34:11 +0000 (+0200) Subject: efivars: don't crash when somebody wants to remove an efi variable X-Git-Tag: v235~135^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6780%2Fhead;p=thirdparty%2Fsystemd.git efivars: don't crash when somebody wants to remove an efi variable This corrects b3c908b4a230c5cca0dcdd7e94d02ec54a298abf by allowing a NULL value again for variable deletion. Fixes: #6753 --- diff --git a/src/shared/efivars.c b/src/shared/efivars.c index 8229e6b1834..2503346610e 100644 --- a/src/shared/efivars.c +++ b/src/shared/efivars.c @@ -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",