diff options
author | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-05-15 20:44:54 +0000 |
---|---|---|
committer | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-05-15 20:44:54 +0000 |
commit | fa5a5019a3769698ebdd2c6ca449411a06007c29 (patch) | |
tree | 87893daf0e670b8eec65cef5f2a83b067a31c203 | |
parent | 4fd642d65617363337a72c021aa6e6850ba13ebc (diff) | |
download | nss-hg-fa5a5019a3769698ebdd2c6ca449411a06007c29.tar.gz |
Patch contributed by jonsmirl@yahoo.com
[Bug 337085] Coverity 447, dead code in mozilla/security/nss/lib/certhigh/ocsp.c. r=wtchang
-rw-r--r-- | security/nss/lib/certhigh/ocsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/nss/lib/certhigh/ocsp.c b/security/nss/lib/certhigh/ocsp.c index c271c1866..b16a74a9c 100644 --- a/security/nss/lib/certhigh/ocsp.c +++ b/security/nss/lib/certhigh/ocsp.c @@ -1755,6 +1755,8 @@ ocsp_ParseURL(char *url, char **pHostname, PRUint16 *pPort, char **pPath) path[len] = '\0'; } else { path = PORT_Strdup("/"); + if (path == NULL) + goto loser; } *pHostname = hostname; @@ -1765,8 +1767,6 @@ ocsp_ParseURL(char *url, char **pHostname, PRUint16 *pPort, char **pPath) loser: if (hostname != NULL) PORT_Free(hostname); - if (path != NULL) - PORT_Free(path); PORT_SetError(SEC_ERROR_CERT_BAD_ACCESS_LOCATION); return SECFailure; } |