diff options
author | cvs2hg <devnull@localhost> | 2002-10-25 23:16:24 +0000 |
---|---|---|
committer | cvs2hg <devnull@localhost> | 2002-10-25 23:16:24 +0000 |
commit | f972f146c6a4ce8801ae171823dc7521f546fcd1 (patch) | |
tree | 5f3fb4496e7460c46c5e2c68a905c62a3451d858 | |
parent | 39f7c52c8bcf366ee735a239674d9cdbd4994646 (diff) | |
parent | 4d757f7251c919a0c8460b476e8f954247ba54ec (diff) | |
download | nss-hg-f972f146c6a4ce8801ae171823dc7521f546fcd1.tar.gz |
fixup commit for tag 'moz_win_20021026'moz_win_20021026
-rw-r--r-- | dbm/makefile.win | 38 | ||||
-rw-r--r-- | dbm/src/Makefile.in | 1 | ||||
-rw-r--r-- | dbm/src/hash.c | 8 | ||||
-rw-r--r-- | security/nss/lib/smime/cmssiginfo.c | 6 |
4 files changed, 47 insertions, 6 deletions
diff --git a/dbm/makefile.win b/dbm/makefile.win new file mode 100644 index 000000000..27470574e --- /dev/null +++ b/dbm/makefile.win @@ -0,0 +1,38 @@ +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): + +DEPTH=.. + +#//------------------------------------------------------------------------ +#// +#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...) +#// (these must come before the common makefiles are included) +#// +#// DIRS - There are subdirectories to process +#// +#//------------------------------------------------------------------------ +DIRS = include src + +#//------------------------------------------------------------------------ +#// +#// Include the common makefile rules +#// +#//------------------------------------------------------------------------ +include <$(DEPTH)\config\rules.mak> + diff --git a/dbm/src/Makefile.in b/dbm/src/Makefile.in index 2898c5230..d65e0f8e7 100644 --- a/dbm/src/Makefile.in +++ b/dbm/src/Makefile.in @@ -63,7 +63,6 @@ endif # WINNT LOCAL_INCLUDES = -I$(srcdir)/../include FORCE_STATIC_LIB = 1 -FORCE_USE_PIC = 1 include $(topsrcdir)/config/rules.mk diff --git a/dbm/src/hash.c b/dbm/src/hash.c index d984c5f30..82d6dba37 100644 --- a/dbm/src/hash.c +++ b/dbm/src/hash.c @@ -566,11 +566,9 @@ hdestroy(HTAB *hashp) #endif free(hashp->filename); } - if (hashp->tmp_buf) - free(hashp->tmp_buf); - if (hashp->tmp_key) - free(hashp->tmp_key); + free(hashp); + if (save_errno) { errno = save_errno; return (DBM_ERROR); @@ -902,7 +900,7 @@ hash_access( n = *bp++; ndx = 1; off = hashp->BSIZE; - } else if (bp[1] < REAL_KEY) { + } else if (bp[1] < REAL_KEY) { if ((ndx = __find_bigpair(hashp, rbufp, ndx, kp, (int)size)) > 0) goto found; diff --git a/security/nss/lib/smime/cmssiginfo.c b/security/nss/lib/smime/cmssiginfo.c index 5c5e934e7..a9c46d07e 100644 --- a/security/nss/lib/smime/cmssiginfo.c +++ b/security/nss/lib/smime/cmssiginfo.c @@ -879,6 +879,7 @@ NSS_SMIMESignerInfo_SaveSMIMEProfile(NSSCMSSignerInfo *signerinfo) CERTCertDBHandle *certdb; int save_error; SECStatus rv; + PRBool must_free_cert = PR_FALSE; certdb = CERT_GetDefaultCertDB(); @@ -900,6 +901,7 @@ NSS_SMIMESignerInfo_SaveSMIMEProfile(NSSCMSSignerInfo *signerinfo) cert = NSS_SMIMEUtil_GetCertFromEncryptionKeyPreference(certdb, ekp); if (cert == NULL) return SECFailure; + must_free_cert = PR_TRUE; } if (cert == NULL) { @@ -915,6 +917,8 @@ NSS_SMIMESignerInfo_SaveSMIMEProfile(NSSCMSSignerInfo *signerinfo) * should have already been saved */ #ifdef notdef if (CERT_VerifyCert(certdb, cert, PR_TRUE, certUsageEmailRecipient, PR_Now(), signerinfo->cmsg->pwfn_arg, NULL) != SECSuccess) { + if (must_free_cert) + CERT_DestroyCertificate(cert); return SECFailure; } #endif @@ -939,6 +943,8 @@ NSS_SMIMESignerInfo_SaveSMIMEProfile(NSSCMSSignerInfo *signerinfo) } rv = CERT_SaveSMimeProfile (cert, profile, utc_stime); + if (must_free_cert) + CERT_DestroyCertificate(cert); /* * Restore the saved error in case the calls above set a new |