[27642] in CVS-changelog-for-Kerberos-V5
krb5 commit: Fix kdb_ldap_create_principal cleanup
daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Mar 29 11:41:40 2013
Date: Fri, 29 Mar 2013 11:41:34 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201303291541.r2TFfYJZ007446@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/49f908733b5ddf491e53c7c84d0cbae263e31eae
commit 49f908733b5ddf491e53c7c84d0cbae263e31eae
Author: Greg Hudson <ghudson@mit.edu>
Date: Thu Mar 28 15:59:07 2013 -0400
Fix kdb_ldap_create_principal cleanup
entry must be initialized before all code which can jump to cleanup.
src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c
index 1050fcd..7494928 100644
--- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c
+++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c
@@ -1344,6 +1344,8 @@ kdb_ldap_create_principal(krb5_context context, krb5_principal princ,
krb5_timestamp now;
krb5_actkvno_node actkvno;
+ memset(&entry, 0, sizeof(entry));
+
if ((pblock == NULL) || (context == NULL)) {
retval = EINVAL;
goto cleanup;
@@ -1355,8 +1357,6 @@ kdb_ldap_create_principal(krb5_context context, krb5_principal princ,
goto cleanup;
}
- memset(&entry, 0, sizeof(entry));
-
tl_data = malloc(sizeof(*tl_data));
if (tl_data == NULL) {
retval = ENOMEM;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5