From: Greg Hudson Date: Fri, 23 Jan 2009 17:24:50 +0000 (+0000) Subject: In kadmin, free the correct item in an error case (fixes a double-free X-Git-Tag: krb5-1.7-alpha1~47 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b03e9bad2d507501ccd4c64f3af27910cae32cc4;p=krb5.git 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 --- 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);