From e1e26566ec60aa66a3c21682322ebc376df609b2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 8 Sep 2017 17:34:11 +0200 Subject: 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 --- src/shared/efivars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shared/efivars.c') diff --git a/src/shared/efivars.c b/src/shared/efivars.c index 8229e6b183..2503346610 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", -- cgit v1.2.1