]> git.ipfire.org Git - thirdparty/openssl.git/commit
apps/cmp.c: Free bio on error to avoid memory leak
authorJiashengJiang <jiasheng@purdue.edu>
Fri, 16 May 2025 22:34:03 +0000 (18:34 -0400)
committerTomas Mraz <tomas@openssl.org>
Tue, 27 May 2025 17:51:55 +0000 (19:51 +0200)
commite0ae801728776b53e2be0972846072ce32bea304
treefcb1e24380aa106a2aeb59fad5418ed034ba948a
parent0873cd1b680d2f54de3dbcc754ea6b1b397f112b
apps/cmp.c: Free bio on error to avoid memory leak

Call BIO_free() to release bio if ASN1_i2d_bio_of() fails, preventing a memory leak.

Fixes: 6a3579e190 ("CMP: add support for requesting cert template using genm/genp")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27647)
apps/cmp.c