]> 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:52:21 +0000 (19:52 +0200)
commit612f2b0fa4e7dc4105be6be106ad85a8f13de6da
treea0782fb87532835fa0027ddb9ce837c5bab02d98
parent0e9ca38e84f60386f11d37f48297afd865328940
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)

(cherry picked from commit e0ae801728776b53e2be0972846072ce32bea304)
apps/cmp.c