talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 4236b38514c75284814ae39c85112534292064d6
parent 7a307732af407bfdcd37c0fd78bae28327f38eef
Author: wwp <subscript@free.fr>
Date:   Fri,  1 Oct 2021 08:35:29 +0200

Fix CID 1402307: use after free, and do a proper freeing of struct.

Diffstat:
Msrc/compose.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/compose.c b/src/compose.c @@ -2389,8 +2389,6 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch) } if (!account) { account = cur_account; - if (manual_headers) - g_free(manual_headers); } cm_return_val_if_fail(account != NULL, NULL); @@ -2450,7 +2448,7 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch) compose->updating = FALSE; compose_destroy(compose); if (manual_headers) - g_free(manual_headers); + procheader_entries_free(manual_headers); return NULL; } compose_reedit_set_entry(compose, msginfo);