Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Unified Diff: nss/mozilla/security/nss/lib/certdb/stanpcertdb.c

Issue 10540165: Update NSS to NSS 3.13.5 (from NSS 3.13.3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nss/mozilla/security/nss/lib/certdb/stanpcertdb.c
===================================================================
--- nss/mozilla/security/nss/lib/certdb/stanpcertdb.c (revision 142244)
+++ nss/mozilla/security/nss/lib/certdb/stanpcertdb.c (working copy)
@@ -311,13 +311,15 @@
}
stanNick = nssCertificate_GetNickname(c, NULL);
if (stanNick && nickname && strcmp(nickname, stanNick) != 0) {
- /* take the new nickname */
+ /* different: take the new nickname */
cert->nickname = NULL;
+ nss_ZFreeIf(stanNick);
stanNick = NULL;
}
if (!stanNick && nickname) {
- stanNick = nssUTF8_Duplicate((NSSUTF8 *)nickname, c->object.arena);
- }
+ /* Either there was no nickname yet, or we have a new nickname */
+ stanNick = nssUTF8_Duplicate((NSSUTF8 *)nickname, NULL);
+ } /* else: old stanNick is identical to new nickname */
/* Delete the temp instance */
nssCertificateStore_Lock(context->certStore, &lockTrace);
nssCertificateStore_RemoveCertLOCKED(context->certStore, c);
@@ -336,6 +338,8 @@
&c->serial,
cert->emailAddr,
PR_TRUE);
+ nss_ZFreeIf(stanNick);
+ stanNick = NULL;
PK11_FreeSlot(slot);
if (!permInstance) {
if (NSS_GetError() == NSS_ERROR_INVALID_CERTIFICATE) {

Powered by Google App Engine
This is Rietveld 408576698