diff --git a/security/manager/ssl/src/nsCertOverrideService.cpp b/security/manager/ssl/src/nsCertOverrideService.cpp index a697a270c58e..916b4637c088 100644 --- a/security/manager/ssl/src/nsCertOverrideService.cpp +++ b/security/manager/ssl/src/nsCertOverrideService.cpp @@ -417,7 +417,7 @@ GetCertFingerprintByOidTag(CERTCertificate* nsscert, nsCString &fp) { unsigned int hash_len = HASH_ResultLenByOidTag(aOidTag); - nsRefPtr fingerprint = nsStringBuffer::Alloc(hash_len); + nsStringBuffer* fingerprint = nsStringBuffer::Alloc(hash_len); if (!fingerprint) return NS_ERROR_OUT_OF_MEMORY; @@ -429,6 +429,7 @@ GetCertFingerprintByOidTag(CERTCertificate* nsscert, fpItem.len = hash_len; fp.Adopt(CERT_Hexify(&fpItem, 1)); + fingerprint->Release(); return NS_OK; }