svn commit: samba r15480 - in branches/SAMBA_4_0/source/kdc: .
abartlet at samba.org
abartlet at samba.org
Sun May 7 04:16:49 GMT 2006
Author: abartlet
Date: 2006-05-07 04:16:48 +0000 (Sun, 07 May 2006)
New Revision: 15480
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15480
Log:
Patch from lha, to ensure we don't leave a free()'ed element in the
principal on strdup failure.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/kdc/hdb-ldb.c
Changeset:
Modified: branches/SAMBA_4_0/source/kdc/hdb-ldb.c
===================================================================
--- branches/SAMBA_4_0/source/kdc/hdb-ldb.c 2006-05-06 20:17:12 UTC (rev 15479)
+++ branches/SAMBA_4_0/source/kdc/hdb-ldb.c 2006-05-07 04:16:48 UTC (rev 15480)
@@ -295,9 +295,6 @@
* replace the client principal's realm with the one
* we determine from our records */
- /* don't leak */
- free(*krb5_princ_realm(context, entry_ex->entry.principal));
-
/* this has to be with malloc() */
strdup_realm = strdup(realm);
if (!strdup_realm) {
@@ -305,6 +302,7 @@
krb5_clear_error_string(context);
goto out;
}
+ free(*krb5_princ_realm(context, entry_ex->entry.principal));
krb5_princ_set_realm(context, entry_ex->entry.principal, &strdup_realm);
}
More information about the samba-cvs
mailing list