diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-08-20 22:11:17 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-27 18:26:58 +0300 |
commit | de95930946f5de3b5f43aaf4153a334d841d4f3c (patch) | |
tree | 5e8283f2ec91b7c86a688113554827d977d61c8d /lib/rsa/rsa-sign.c | |
parent | 4431a9889c67f76e66aa99fb9ad9e10c014e268f (diff) | |
download | u-boot-de95930946f5de3b5f43aaf4153a334d841d4f3c.tar.xz |
lib/rsa: correct check after allocation in fdt_add_bignum()
After allocating to pointer ctx we should check that pointer and not
another pointer already checked above.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/rsa/rsa-sign.c')
-rw-r--r-- | lib/rsa/rsa-sign.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index 40ca1e1f57..1f0d81bd7a 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -708,7 +708,7 @@ static int fdt_add_bignum(void *blob, int noffset, const char *prop_name, return -ENOMEM; } ctx = BN_CTX_new(); - if (!tmp) { + if (!ctx) { fprintf(stderr, "Out of memory (bignum context)\n"); return -ENOMEM; } |