From 75154f33547ef5d7702e0bc2ae9f6122919e32c5 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 21 Feb 1991 15:49:22 +0000 Subject: [PATCH] correctly plug the leak git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1759 dc483132-0cff-0310-8789-dd5450dbe970 --- src/tests/hammer/kdc5_hammer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tests/hammer/kdc5_hammer.c b/src/tests/hammer/kdc5_hammer.c index 41f41f3c4..87bda9ee2 100644 --- a/src/tests/hammer/kdc5_hammer.c +++ b/src/tests/hammer/kdc5_hammer.c @@ -196,7 +196,6 @@ main(argc, argv) strcat(ctmp, ctmp2); client = ctmp; - if ((counter != 0) && (n != 1)) krb5_free_principal(client_princ); if (get_tgt (client, &client_princ, ccache)) { errors++; n_tried++; @@ -215,6 +214,7 @@ main(argc, argv) errors++; n_tried++; } + krb5_free_principal(client_princ); } } } @@ -398,7 +398,8 @@ int get_tgt (p_client_str, p_client, ccache) p_client_str, ccache, &my_creds); - my_creds.server = 0; + my_creds.server = my_creds.client = 0; + krb5_free_address(my_addresses); krb5_free_cred_contents(&my_creds); if (code != 0) { com_err (prog, code, "while getting initial credentials"); -- 2.26.2