From 5cec8a8ff91421c9d63bf344882b88e2ac54d2fa Mon Sep 17 00:00:00 2001 From: Barry Jaspan Date: Sun, 1 Jul 1990 15:28:44 +0000 Subject: [PATCH] barrier (cache->ops) bjaspan: fixed memory leak in seqential scan, unviolated an abstraction git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1012 dc483132-0cff-0310-8789-dd5450dbe970 --- src/clients/klist/klist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c index 4390680cc..b769a4e79 100644 --- a/src/clients/klist/klist.c +++ b/src/clients/klist/klist.c @@ -105,7 +105,7 @@ main(argc, argv) exit(1); } printf("Ticket cache: %s\nDefault principal: %s\n", - (*cache->ops->get_name)(cache), name); + krb5_cc_get_name(cache), name); free(name); if (code = krb5_cc_start_seq_get(cache, &cur)) { com_err(argv[0], code, "while starting to retrieve tickets"); @@ -124,6 +124,8 @@ main(argc, argv) continue; } printf("C: %s\tS:%s\n", name, sname); + free(name); + free(sname); } if (code == KRB5_CC_END) { if (code = krb5_cc_end_seq_get(cache, &cur)) { -- 2.26.2