Module: kamailio Branch: master Commit: 76a72a0092272d0f0ca7cf3df22ad6d05a79e782 URL: https://github.com/kamailio/kamailio/commit/76a72a0092272d0f0ca7cf3df22ad6d0...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2025-04-22T22:16:44+02:00
ims_isc: free allocated route in case of error
---
Modified: src/modules/ims_isc/mark.c
---
Diff: https://github.com/kamailio/kamailio/commit/76a72a0092272d0f0ca7cf3df22ad6d0... Patch: https://github.com/kamailio/kamailio/commit/76a72a0092272d0f0ca7cf3df22ad6d0...
---
diff --git a/src/modules/ims_isc/mark.c b/src/modules/ims_isc/mark.c index cbd0c17e3cd..9e417e29d3f 100644 --- a/src/modules/ims_isc/mark.c +++ b/src/modules/ims_isc/mark.c @@ -348,7 +348,7 @@ int isc_mark_write_route(struct sip_msg *msg, str *as, str *iscmark) { struct hdr_field *first; struct lump *anchor; - str route; + str route = STR_NULL;
parse_headers(msg, HDR_EOH_F, 0); first = msg->headers; @@ -367,6 +367,7 @@ int isc_mark_write_route(struct sip_msg *msg, str *as, str *iscmark) anchor = anchor_lump(msg, first->name.s - msg->buf, 0, HDR_ROUTE_T); if(anchor == NULL) { LM_ERR("isc_mark_write_route: anchor_lump failed\n"); + pkg_free(route.s); return 0; }