summaryrefslogtreecommitdiff
path: root/lib/ecdsa
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-04-07 16:40:02 -0600
committerTom Rini <trini@konsulko.com>2025-04-08 11:43:23 -0600
commitff61d6bfd1c9534d3fc2397846a5899639f2e55d (patch)
treedcfe4bc52848a5637c975a3352b57885e5b8a06d /lib/ecdsa
parent34820924edbc4ec7803eb89d9852f4b870fa760a (diff)
parentf892a7f397a66d8d09f418d1e0e06dfb48bac27d (diff)
Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc4c ("x86: emulation: Disable bloblist for now") as that was intended only for the release due to time.
Diffstat (limited to 'lib/ecdsa')
-rw-r--r--lib/ecdsa/ecdsa-libcrypto.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ecdsa/ecdsa-libcrypto.c b/lib/ecdsa/ecdsa-libcrypto.c
index 1c5dde60691..f0095e9dbcf 100644
--- a/lib/ecdsa/ecdsa-libcrypto.c
+++ b/lib/ecdsa/ecdsa-libcrypto.c
@@ -363,8 +363,10 @@ int ecdsa_add_verify_data(struct image_sign_info *info, void *fdt)
ret = prepare_ctx(&ctx, info);
if (ret >= 0) {
ret = do_add(&ctx, fdt, fdt_key_name, info);
- if (ret < 0)
- ret = ret == -FDT_ERR_NOSPACE ? -ENOSPC : -EIO;
+ if (ret < 0) {
+ free_ctx(&ctx);
+ return ret == -FDT_ERR_NOSPACE ? -ENOSPC : -EIO;
+ }
}
free_ctx(&ctx);