mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 17:52:07 +02:00
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>
This commit is contained in:
committed by
Tom Rini
parent
4431a9889c
commit
de95930946
@@ -708,7 +708,7 @@ static int fdt_add_bignum(void *blob, int noffset, const char *prop_name,
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
ctx = BN_CTX_new();
|
ctx = BN_CTX_new();
|
||||||
if (!tmp) {
|
if (!ctx) {
|
||||||
fprintf(stderr, "Out of memory (bignum context)\n");
|
fprintf(stderr, "Out of memory (bignum context)\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user