From f409a8c9f6fde33eaf8b428887e219b56740b0a5 Mon Sep 17 00:00:00 2001 From: Rick Barenthin Date: Tue, 6 Dec 2022 10:39:18 +0100 Subject: [PATCH] tm: cleanup parsed body at the end t_continue_helper - if t_suspend and t_continue are used for replies and in the called route in t_continue the body of the sip message is parsed the pkg memory of the parsed body is leaked --- src/modules/tm/t_suspend.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/tm/t_suspend.c b/src/modules/tm/t_suspend.c index f0255d66478..4e25c3c89b1 100644 --- a/src/modules/tm/t_suspend.c +++ b/src/modules/tm/t_suspend.c @@ -554,6 +554,11 @@ static int t_continue_helper(unsigned int hash_index, unsigned int label, hdr = hdr->next; } } + + /* trigger free of body */ + if(brpl->body && brpl->body->free) { + brpl->body->free(&brpl->body); + } sip_msg_free(brpl); } }