svn rev #22003: trunk/src/tests/asn.1/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Feb 13 17:03:37 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22003
Commit By: ghudson
Log Message:
In krb5_decode_leak.c, work around the oddity that
krb5_free_cred_enc_part is a contents-only free function.
Changed Files:
U trunk/src/tests/asn.1/krb5_decode_leak.c
Modified: trunk/src/tests/asn.1/krb5_decode_leak.c
===================================================================
--- trunk/src/tests/asn.1/krb5_decode_leak.c 2009-02-13 22:00:47 UTC (rev 22002)
+++ trunk/src/tests/asn.1/krb5_decode_leak.c 2009-02-13 22:03:37 UTC (rev 22003)
@@ -22,6 +22,20 @@
krb5_context test_context;
+/*
+ * Contrary to our usual convention, krb5_free_cred_enc_part is a
+ * contents-only free function (and is assumed to be by mk_cred and
+ * rd_cred) and we have no whole-structure free function for that data
+ * type. So create one here.
+ */
+static void
+free_cred_enc_part_whole(krb5_context ctx,
+ krb5_cred_enc_part *val)
+{
+ krb5_free_cred_enc_part(ctx, val);
+ free(val);
+}
+
int
main(int argc, char **argv)
{
@@ -410,7 +424,7 @@
setup(cep, "cred_enc_part", ktest_make_sample_cred_enc_part);
leak_test(cep, encode_krb5_enc_cred_part, decode_krb5_enc_cred_part,
- krb5_free_cred_enc_part);
+ free_cred_enc_part_whole);
ktest_destroy_principal(&(cep.ticket_info[0]->client));
ktest_destroy_principal(&(cep.ticket_info[0]->server));
@@ -425,7 +439,7 @@
ktest_destroy_address(&(cep.s_address));
ktest_destroy_address(&(cep.r_address));
leak_test(cep, encode_krb5_enc_cred_part, decode_krb5_enc_cred_part,
- krb5_free_cred_enc_part);
+ free_cred_enc_part_whole);
ktest_empty_cred_enc_part(&cep);
}
More information about the cvs-krb5
mailing list