diff options
author | Patrick Wildt <patrick@blueri.se> | 2020-05-07 02:13:18 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-05-07 18:23:16 +0200 |
commit | 9ad15227bb92acc2bf73c60da1bcf2ae3774246d (patch) | |
tree | 60080d14f1dfae6b98e72a21bd7c0ad81fec906b | |
parent | 42a426e027df472714e8d6209cafac291935c331 (diff) |
efi_loader: efi_variable_parse_signature() returns NULL on error
efi_variable_parse_signature() returns NULL on error, so IS_ERR()
is an incorrect check. The goto err leads to pkcs7_free_message(),
which works fine on a NULL ptr.
Signed-off-by: Patrick Wildt <patrick@blueri.se>
Reviewed-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-rw-r--r-- | lib/efi_loader/efi_variable.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index 568bd3ccfd..60c1201757 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -524,9 +524,8 @@ static efi_status_t efi_variable_authenticate(u16 *variable, var_sig = efi_variable_parse_signature(auth->auth_info.cert_data, auth->auth_info.hdr.dwLength - sizeof(auth->auth_info)); - if (IS_ERR(var_sig)) { + if (!var_sig) { debug("Parsing variable's signature failed\n"); - var_sig = NULL; goto err; } |