From: Alexandra Ellwood Date: Tue, 21 Oct 2008 21:56:10 +0000 (+0000) Subject: kim_identity_change_password_with_credential leaks krb5_creds X-Git-Tag: krb5-1.7-alpha1~276 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=006d3ec49636996908bf1c109f01fe76192e4e68;p=krb5.git kim_identity_change_password_with_credential leaks krb5_creds ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20907 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kim/lib/kim_identity.c b/src/kim/lib/kim_identity.c index 7cf53d4f0..834b8d614 100644 --- a/src/kim/lib/kim_identity.c +++ b/src/kim/lib/kim_identity.c @@ -569,6 +569,7 @@ kim_error kim_identity_change_password_with_credential (kim_identity in_ident krb5_data message_data; krb5_data description_data; + if (!err && !in_identity ) { err = check_error (KIM_NULL_PARAMETER_ERR); } if (!err && !in_credential ) { err = check_error (KIM_NULL_PARAMETER_ERR); } if (!err && !in_new_password ) { err = check_error (KIM_NULL_PARAMETER_ERR); } if (!err && !in_ui_context ) { err = check_error (KIM_NULL_PARAMETER_ERR); } @@ -666,6 +667,8 @@ kim_error kim_identity_change_password_with_credential (kim_identity in_ident *out_rejected_err = rejected_err; } + if (creds) { krb5_free_creds (in_identity->context, creds); } + return check_error (err); }