Try to not leak memory.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18808 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-10-22 07:00:33 +00:00
parent e59d785334
commit 09196ad8d5

View File

@@ -495,13 +495,15 @@ main(int argc, char **argv)
test_def_cc_name(context); test_def_cc_name(context);
test_cache_iter(context, "MEMORY", 0); test_cache_iter(context, "MEMORY", 0);
{ {
krb5_ccache id; krb5_ccache id1, id2;
krb5_principal p; krb5_principal p;
krb5_cc_new_unique(context, "MEMORY", "bar", &id); krb5_cc_new_unique(context, "MEMORY", "bar", &id1);
krb5_cc_new_unique(context, "MEMORY", "baz", &id); krb5_cc_new_unique(context, "MEMORY", "baz", &id2);
krb5_parse_name(context, "lha@SU.SE", &p); krb5_parse_name(context, "lha@SU.SE", &p);
krb5_cc_initialize(context, id, p); krb5_cc_initialize(context, id1, p);
krb5_free_principal(context, p); krb5_free_principal(context, p);
krb5_cc_destroy(context, id1);
krb5_cc_destroy(context, id2);
} }
test_cache_find(context, "MEMORY", "lha@SU.SE", 1); test_cache_find(context, "MEMORY", "lha@SU.SE", 1);