[sr-dev] [kamailio] dmq: fix memory leak (#59)

Charles Chance notifications at github.com
Fri Jan 30 12:20:30 CET 2015


The problem may be earlier in worker_loop():

 95                                 if (parse_from_header(current_job->msg) < 0) {
 96                                         LM_ERR("bad sip message or missing From hdr\n");
 97                                 } else {
 98                                         dmq_node = find_dmq_node_uri(node_list, &((struct to_body*)current_job->msg->from->parsed)->uri);
 99                                 }

The msg has already been cloned and as I understand it, we should not parse a cloned msg since doing so will link pkg structures to shm msg.

As we already pre-parsed the msg prior to cloning it (when adding the job to the worker queue), the parsed from header should already be available to us.


---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/59#issuecomment-72187202
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150130/81d94322/attachment-0001.html>


More information about the sr-dev mailing list