From: Richard Levitte Date: Wed, 30 Oct 2002 09:42:47 +0000 (+0000) Subject: Plug potential memory leak. X-Git-Tag: OpenSSL_0_9_7-beta4~91 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0eae6cd5f20525def0bb5eb894a896a427c0e573;p=oweals%2Fopenssl.git Plug potential memory leak. Identified by Goetz Babin-Ebell --- diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index a8db6ffbf5..296865a4dc 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -249,7 +249,7 @@ int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char ret = 1; err: - if (!pnm) OPENSSL_free(nm); + if (!ret || !pnm) OPENSSL_free(nm); OPENSSL_free(header); if (!ret) OPENSSL_free(data); return ret;