From 52dd25b89b987f29563e876d97d94fcf9527d23d Mon Sep 17 00:00:00 2001 From: "alexei.volkov.bugs%sun.com" Date: Mon, 15 May 2006 20:44:46 +0000 Subject: [PATCH] Patch contributed by jonsmirl@yahoo.com [Bug 337085] Coverity 447, dead code in mozilla/security/nss/lib/certhigh/ocsp.c . r=wtchang git-svn-id: svn://10.0.0.236/trunk@196588 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/certhigh/ocsp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mozilla/security/nss/lib/certhigh/ocsp.c b/mozilla/security/nss/lib/certhigh/ocsp.c index e11a7cb9464..5406b9b6f5d 100644 --- a/mozilla/security/nss/lib/certhigh/ocsp.c +++ b/mozilla/security/nss/lib/certhigh/ocsp.c @@ -38,7 +38,7 @@ * Implementation of OCSP services, for both client and server. * (XXX, really, mostly just for client right now, but intended to do both.) * - * $Id: ocsp.c,v 1.23 2006-02-08 06:13:57 rrelyea%redhat.com Exp $ + * $Id: ocsp.c,v 1.24 2006-05-15 20:44:46 alexei.volkov.bugs%sun.com Exp $ */ #include "prerror.h" @@ -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; }