Plug potential memory leak.

Identified by Goetz Babin-Ebell <babinebell@trustcenter.de>
This commit is contained in:
Richard Levitte 2002-10-30 09:42:42 +00:00
parent 769fedc3ad
commit 40efa67248

View File

@ -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;