summaryrefslogtreecommitdiff
path: root/security/nss/lib
diff options
context:
space:
mode:
authorthayes%netscape.com <devnull@localhost>2000-09-28 21:36:11 +0000
committerthayes%netscape.com <devnull@localhost>2000-09-28 21:36:11 +0000
commitb67ae341745c8a37504bb25b5142d3c40dbd6c80 (patch)
treef739b11ae2b65167efabf9962af3b24547d02c42 /security/nss/lib
parentf9f988ed75b729df03dbbae9705d71ca91bcf5dc (diff)
downloadnss-hg-b67ae341745c8a37504bb25b5142d3c40dbd6c80.tar.gz
Bugzilla 39476: Copy the argument string in the OpenDBFilename callback function.
Diffstat (limited to 'security/nss/lib')
-rw-r--r--security/nss/lib/softoken/keydb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/security/nss/lib/softoken/keydb.c b/security/nss/lib/softoken/keydb.c
index e224c18d9..8f168a296 100644
--- a/security/nss/lib/softoken/keydb.c
+++ b/security/nss/lib/softoken/keydb.c
@@ -544,7 +544,7 @@ makeGlobalSalt(SECKEYKeyDBHandle *handle)
static char *
keyDBFilenameCallback(void *arg, int dbVersion)
{
- return((char *)arg);
+ return(PORT_Strdup((char *)arg));
}
SECKEYKeyDBHandle *
@@ -629,8 +629,8 @@ newdb:
handle->db = dbopen( dbname,
O_RDWR | O_CREAT | O_TRUNC, 0600, DB_HASH, 0 );
- PORT_Free( dbname );
- dbname = NULL;
+ PORT_Free( dbname );
+ dbname = NULL;
/* if create fails then we lose */
if ( handle->db == NULL ) {
@@ -664,8 +664,8 @@ newdb:
}
}
- PORT_Free( dbname );
- dbname = NULL;
+ PORT_Free( dbname );
+ dbname = NULL;
}
/* we are using the old salt if we updated from an old db */