From 6c21b7c10e86c86c800776a6f5c36f6fdd94380e Mon Sep 17 00:00:00 2001 From: Harsh Pathak Date: Mon, 16 Jun 2014 20:27:00 +0200 Subject: [PATCH] Bug 1017826 - prevent a potential memory leak in OCSPCache::Put. r=keeler --- security/certverifier/OCSPCache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/security/certverifier/OCSPCache.cpp b/security/certverifier/OCSPCache.cpp index 3e5a4631aa6a..06c424b315a0 100644 --- a/security/certverifier/OCSPCache.cpp +++ b/security/certverifier/OCSPCache.cpp @@ -286,6 +286,7 @@ OCSPCache::Put(const CERTCertificate* aCert, SECStatus rv = newEntry->Init(aCert, aIssuerCert, aErrorCode, aThisUpdate, aValidThrough); if (rv != SECSuccess) { + delete newEntry; return rv; } mEntries.append(newEntry);