ac1c2d05bc
In cred_delete(), sp is freed after returning from krb5_storage_to_data(). Between this point and the subsequent assignment to sp via krb_storage_emem() there are two jumps to out, both are executed in an ENOMEM scenario: malloc fail for cred_data_in_file and krb5_principal_set_realm() fail. In out, sp is freed again. This patch fixes the issue by freeing sp right before the krb5_storage_emem() call. Signed-off-by: Linar Galimov <galimovlz@sgu.ru> Signed-off-by: Dmitry Mikhalchenko <tascad@altlinux.org>