Files
heimdal/lib
Linar Galimov ac1c2d05bc krb5: Fix a double free when running into ENOMEM
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>
2026-06-23 15:34:32 +01:00
..
2026-05-25 17:32:05 -05:00
2024-06-16 23:30:48 -04:00
2026-01-22 23:32:14 -06:00
2024-06-16 23:30:48 -04:00