Author: gd Date: 2005-09-13 21:26:25 +0000 (Tue, 13 Sep 2005) New Revision: 10211
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10211 Log: Fix another memleak (this time in the kerberos keytab code) Guenther Modified: branches/SAMBA_3_0/source/libads/kerberos_verify.c trunk/source/libads/kerberos_verify.c Changeset: Modified: branches/SAMBA_3_0/source/libads/kerberos_verify.c =================================================================== --- branches/SAMBA_3_0/source/libads/kerberos_verify.c 2005-09-13 21:21:43 UTC (rev 10210) +++ branches/SAMBA_3_0/source/libads/kerberos_verify.c 2005-09-13 21:26:25 UTC (rev 10211) @@ -128,7 +128,11 @@ ZERO_STRUCT(kt_cursor); out: - + + for (i = 0; i < sizeof(valid_princ_formats) / sizeof(valid_princ_formats[0]); i++) { + SAFE_FREE(valid_princ_formats[i]); + } + if (!auth_ok) { if (!number_matched_principals) { DEBUG(3, ("ads_keytab_verify_ticket: no keytab principals matched expected file service name.\n")); Modified: trunk/source/libads/kerberos_verify.c =================================================================== --- trunk/source/libads/kerberos_verify.c 2005-09-13 21:21:43 UTC (rev 10210) +++ trunk/source/libads/kerberos_verify.c 2005-09-13 21:26:25 UTC (rev 10211) @@ -128,7 +128,11 @@ ZERO_STRUCT(kt_cursor); out: - + + for (i = 0; i < sizeof(valid_princ_formats) / sizeof(valid_princ_formats[0]); i++) { + SAFE_FREE(valid_princ_formats[i]); + } + if (!auth_ok) { if (!number_matched_principals) { DEBUG(3, ("ads_keytab_verify_ticket: no keytab principals matched expected file service name.\n"));