commit 3188ba81356cc381f288fd64e1efa88d261accf9
parent a6e473fd6455d949176495d5370d4858caebeb2e
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:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/compose.c b/src/compose.c
@@ -2368,8 +2368,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);
@@ -2429,7 +2427,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);