[svn] dirmngr - r290 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Thu Feb 14 16:56:23 CET 2008
Author: marcus
Date: 2008-02-14 16:56:23 +0100 (Thu, 14 Feb 2008)
New Revision: 290
Modified:
trunk/src/ChangeLog
trunk/src/crlcache.c
trunk/src/validate.c
Log:
2008-02-14 Marcus Brinkmann <marcus at g10code.de>
* validate.c (check_cert_policy): Use ksba_free instead of xfree.
(validate_cert_chain): Likewise. Free SUBJECT on error.
(cert_usage_p): Likewise.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2008-02-14 15:41:33 UTC (rev 289)
+++ trunk/src/ChangeLog 2008-02-14 15:56:23 UTC (rev 290)
@@ -1,5 +1,9 @@
2008-02-14 Marcus Brinkmann <marcus at g10code.de>
+ * validate.c (check_cert_policy): Use ksba_free instead of xfree.
+ (validate_cert_chain): Likewise. Free SUBJECT on error.
+ (cert_usage_p): Likewise.
+
* crlcache.c (finish_sig_check): Undo last change.
(finish_sig_check): Close md.
(abort_sig_check): New function.
Modified: trunk/src/crlcache.c
===================================================================
--- trunk/src/crlcache.c 2008-02-14 15:41:33 UTC (rev 289)
+++ trunk/src/crlcache.c 2008-02-14 15:56:23 UTC (rev 290)
@@ -1,6 +1,6 @@
/* crlcache.c - LDAP access
- * Copyright (C) 2002 Klarälvdalens Datakonsult AB
- * Copyright (C) 2003, 2004, 2005 g10 Code GmbH
+ * Copyright (C) 2002 Klarälvdalens Datakonsult AB
+ * Copyright (C) 2003, 2004, 2005, 2008 g10 Code GmbH
*
* This file is part of DirMngr.
*
@@ -1673,6 +1673,8 @@
err = gpg_error (GPG_ERR_INV_CRL);
goto failure;
}
+ /* Note: This should be released by ksba_free, not xfree.
+ May need a memory reallocation dance. */
*r_crlissuer = crlissuer; /* (Do it here so we don't need
to free it later) */
Modified: trunk/src/validate.c
===================================================================
--- trunk/src/validate.c 2008-02-14 15:41:33 UTC (rev 289)
+++ trunk/src/validate.c 2008-02-14 15:56:23 UTC (rev 290)
@@ -1,6 +1,6 @@
/* validate.c - Validate a certificate chain.
- * Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
- * Copyright (C) 2004, 2006 g10 Code GmbH
+ * Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+ * Copyright (C) 2004, 2006, 2008 g10 Code GmbH
*
* This file is part of DirMngr.
*
@@ -143,7 +143,7 @@
if (p[strlen (allowed[idx])] != ':')
continue; /* The length does not match. */
/* Yep - it does match: Return okay. */
- xfree (policies);
+ ksba_free (policies);
return 0;
}
}
@@ -159,7 +159,7 @@
err = gpg_error (GPG_ERR_NO_POLICY_MATCH);
}
- xfree (policies);
+ ksba_free (policies);
return err;
}
@@ -358,8 +358,8 @@
{
/* Get the subject and issuer name from the current
certificate. */
- xfree (issuer);
- xfree (subject);
+ ksba_free (issuer);
+ ksba_free (subject);
issuer = ksba_cert_get_issuer (subject_cert, 0);
subject = ksba_cert_get_subject (subject_cert, 0);
@@ -687,7 +687,8 @@
if (r_exptime)
copy_time (r_exptime, exptime);
- xfree (issuer);
+ ksba_free (issuer);
+ ksba_free (subject);
ksba_cert_release (issuer_cert);
if (subject_cert != cert)
ksba_cert_release (subject_cert);
@@ -947,7 +948,7 @@
if ((p = strchr (pend, '\n')))
p++;
}
- xfree (extkeyusages);
+ ksba_free (extkeyusages);
extkeyusages = NULL;
if (!any_critical)
@@ -972,7 +973,7 @@
{
log_error (_("error getting key usage information: %s\n"),
gpg_strerror (err));
- xfree (extkeyusages);
+ ksba_free (extkeyusages);
return err;
}
More information about the Gnupg-commits
mailing list