Module: kamailio
Branch: master
Commit: f409a8c9f6fde33eaf8b428887e219b56740b0a5
URL:
https://github.com/kamailio/kamailio/commit/f409a8c9f6fde33eaf8b428887e219b…
Author: Rick Barenthin <rick(a)ng-voice.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-12-07T14:14:42+01:00
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
---
Modified: src/modules/tm/t_suspend.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f409a8c9f6fde33eaf8b428887e219b…
Patch:
https://github.com/kamailio/kamailio/commit/f409a8c9f6fde33eaf8b428887e219b…
---
diff --git a/src/modules/tm/t_suspend.c b/src/modules/tm/t_suspend.c
index f0255d6647..4e25c3c89b 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);
}
}