projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f59229c
)
fix potential memory leak when allocation fails
author
Bodo Möller
<bodo@openssl.org>
Fri, 11 Mar 2005 09:00:18 +0000
(09:00 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Fri, 11 Mar 2005 09:00:18 +0000
(09:00 +0000)
PR: 801
Submitted by: Nils Larsch
crypto/pem/pem_lib.c
patch
|
blob
|
history
diff --git
a/crypto/pem/pem_lib.c
b/crypto/pem/pem_lib.c
index 1119c2f4d2af5fbdb41396df112f94d5e1575a60..4daf5b0b1072875f4f3e3173252a86ba89470b1f 100644
(file)
--- a/
crypto/pem/pem_lib.c
+++ b/
crypto/pem/pem_lib.c
@@
-655,6
+655,9
@@
int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data,
dataB=BUF_MEM_new();
if ((nameB == NULL) || (headerB == NULL) || (dataB == NULL))
{
+ BUF_MEM_free(nameB);
+ BUF_MEM_free(headerB);
+ BUF_MEM_free(dataB);
PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);
return(0);
}