From b03e9bad2d507501ccd4c64f3af27910cae32cc4 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 23 Jan 2009 17:24:50 +0000 Subject: [PATCH] In kadmin, free the correct item in an error case (fixes a double-free and a memory leak). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21783 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/cli/kadmin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index b2bda1545..469deaa77 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -1486,7 +1486,7 @@ void kadmin_getprinc(argc, argv) retval = krb5_unparse_name(context, dprinc.principal, &canon); if (retval) { com_err("get_principal", retval, "while canonicalizing principal"); - krb5_free_principal(context, princ); + kadm5_free_principal_ent(handle, &dprinc); return; } retval = krb5_unparse_name(context, dprinc.mod_name, &modcanon); -- 2.26.2