diff options
author | Richard Levitte <levitte@openssl.org> | 2002-10-30 09:42:42 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-10-30 09:42:42 +0000 |
commit | 40efa67248c975d4802307e6faeb50e91e320139 (patch) | |
tree | 4def0e40a756e34df70009469021da209ef81f05 /crypto/pem | |
parent | 769fedc3ad67b97e4d679bfcdbbe02b4ee2f62ca (diff) |
Plug potential memory leak.
Identified by Goetz Babin-Ebell <babinebell@trustcenter.de>
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/pem_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 7066e67b39..bfc43e90af 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -251,7 +251,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; |