diff options
author | thayes%netscape.com <devnull@localhost> | 2000-09-28 21:36:11 +0000 |
---|---|---|
committer | thayes%netscape.com <devnull@localhost> | 2000-09-28 21:36:11 +0000 |
commit | b67ae341745c8a37504bb25b5142d3c40dbd6c80 (patch) | |
tree | f739b11ae2b65167efabf9962af3b24547d02c42 /security/nss/lib/softoken/keydb.c | |
parent | f9f988ed75b729df03dbbae9705d71ca91bcf5dc (diff) | |
download | nss-hg-b67ae341745c8a37504bb25b5142d3c40dbd6c80.tar.gz |
Bugzilla 39476: Copy the argument string in the OpenDBFilename callback function.
Diffstat (limited to 'security/nss/lib/softoken/keydb.c')
-rw-r--r-- | security/nss/lib/softoken/keydb.c | 10 |
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 */ |