lib/krb5: fkt_remove_entry do not leak 'emsg'

7ae2dfd853
("krb5: Fix error msg when removing keytab entries") allocated
'emsg' to prevent the leak but then forgot to use it in place
of the original krb5_get_error_message() call.

Change-Id: I0b5acdab54d75399be970837a421740f2ad7d73b
This commit is contained in:
Jeffrey Altman
2022-01-16 17:12:34 -05:00
parent 43592b2e78
commit 5667e80742

View File

@@ -798,7 +798,7 @@ fkt_remove_entry(krb5_context context,
krb5_set_error_message(context, ret,
N_("Could not remove keytab entry from %s: %s", ""),
fkt->filename,
krb5_get_error_message(context, ret));
emsg);
krb5_free_error_message(context, emsg);
} else if (!found) {
krb5_clear_error_message(context);