After allocating to pointer ctx we should check that pointer and not another pointer already checked above.
Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de> --- lib/rsa/rsa-sign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.28.0