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:
2f460e1
)
GH837: Avoid double-free in OCSP parse.
author
Rich Salz
<rsalz@openssl.org>
Tue, 10 May 2016 17:41:06 +0000
(13:41 -0400)
committer
Rich Salz
<rsalz@openssl.org>
Tue, 10 May 2016 17:41:06 +0000
(13:41 -0400)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
crypto/ocsp/ocsp_lib.c
patch
|
blob
|
history
diff --git
a/crypto/ocsp/ocsp_lib.c
b/crypto/ocsp/ocsp_lib.c
index cabf53933a442233328010b0dc31753fe4f46506..ff781e56e73ea207bf9e916f044727e111de3e5d 100644
(file)
--- a/
crypto/ocsp/ocsp_lib.c
+++ b/
crypto/ocsp/ocsp_lib.c
@@
-271,12
+271,18
@@
int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath,
err:
if (buf)
OPENSSL_free(buf);
- if (*ppath)
+ if (*ppath)
{
OPENSSL_free(*ppath);
- if (*pport)
+ *ppath = NULL;
+ }
+ if (*pport) {
OPENSSL_free(*pport);
- if (*phost)
+ *pport = NULL;
+ }
+ if (*phost) {
OPENSSL_free(*phost);
+ *phost = NULL;
+ }
return 0;
}