svn rev #22809: branches/krb5-1-7/src/lib/krb5/krb/
tlyu@MIT.EDU
tlyu at MIT.EDU
Mon Sep 28 21:12:36 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22809
Commit By: tlyu
Log Message:
ticket: 6541
version_fixed: 1.7.1
status: resolved
pull up r22474 from trunk
------------------------------------------------------------------------
r22474 | epeisach | 2009-07-30 13:22:28 -0400 (Thu, 30 Jul 2009) | 7 lines
ticket: 6541
subject: Fix memory leak in k5_pac_verify_server_checksum
k5_pac_verify_server_checksum was leaking memory when the checksum was valid.
t_pac.c: Fix memory leak by forgetting to release memory.
Changed Files:
U branches/krb5-1-7/src/lib/krb5/krb/pac.c
U branches/krb5-1-7/src/lib/krb5/krb/t_pac.c
Modified: branches/krb5-1-7/src/lib/krb5/krb/pac.c
===================================================================
--- branches/krb5-1-7/src/lib/krb5/krb/pac.c 2009-09-29 01:12:31 UTC (rev 22808)
+++ branches/krb5-1-7/src/lib/krb5/krb/pac.c 2009-09-29 01:12:36 UTC (rev 22809)
@@ -547,8 +547,10 @@
ret = krb5_c_verify_checksum(context, server, KRB5_KEYUSAGE_APP_DATA_CKSUM,
&pac_data, &checksum, &valid);
+
+ free(pac_data.data);
+
if (ret != 0) {
- free(pac_data.data);
return ret;
}
Modified: branches/krb5-1-7/src/lib/krb5/krb/t_pac.c
===================================================================
--- branches/krb5-1-7/src/lib/krb5/krb/t_pac.c 2009-09-29 01:12:31 UTC (rev 22808)
+++ branches/krb5-1-7/src/lib/krb5/krb/t_pac.c 2009-09-29 01:12:36 UTC (rev 22809)
@@ -220,6 +220,8 @@
if (ret)
err(context, ret, "krb5_pac_verify 4");
+ krb5_free_data_contents(context, &data);
+
krb5_pac_free(context, pac2);
}
More information about the cvs-krb5
mailing list