Skip to content

Commit

Permalink
bug 129709, incorrect free of cert->nickname
Browse files Browse the repository at this point in the history
r=wtc
  • Loading branch information
ian.mcgreer%sun.com committed Mar 14, 2002
1 parent 4f99503 commit 13ed98b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions security/nss/lib/certdb/stanpcertdb.c
Expand Up @@ -148,12 +148,11 @@ __CERT_AddTempCertToPerm(CERTCertificate *cert, char *nickname,
stanNick = NSSCertificate_GetNickname(c, NULL);
if (stanNick && nickname && strcmp(nickname, stanNick) != 0) {
/* take the new nickname */
PORT_Free(cert->nickname);
cert->nickname = NULL;
stanNick = NULL;
}
if (!stanNick && nickname) {
stanNick = nssUTF8_Duplicate((NSSUTF8 *)nickname, c->object.arena);
cert->nickname = PORT_Strdup(nickname);
}
/* Delete the temp instance */
nssCertificateStore_Remove(context->certStore, c);
Expand Down

0 comments on commit 13ed98b

Please sign in to comment.