]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps/ech.c: free the resources on option help printing
authorEugene Syromiatnikov <esyr@openssl.org>
Mon, 23 Feb 2026 02:55:36 +0000 (03:55 +0100)
committerTomas Mraz <tomas@openssl.org>
Wed, 25 Feb 2026 11:10:23 +0000 (12:10 +0100)
Avoid leaking resources when jumping to opthelp by executing the same
freeing routines.

Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681452
Fixes: 4af71a77387c "ECH CLI implementation"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Wed Feb 25 11:10:37 2026
(Merged from https://github.com/openssl/openssl/pull/30139)

apps/ech.c

index 4626ec6363496b35a3711ddc363692cf283f21c7..c5959b297b593001c7e6c32c1027b60b566cc4c8 100644 (file)
@@ -275,6 +275,8 @@ end:
 opthelp:
     BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
     BIO_printf(bio_err, "\tup to %d -in instances allowed\n", OSSL_ECH_MAXINFILES);
+    OSSL_ECHSTORE_free(es);
+    BIO_free_all(ecf);
     return rv;
 }