[sr-dev] [kamailio/kamailio] siptrace: siptrace: fix memory leak in fake replies tracing (#2295)

Daniel-Constantin Mierla notifications at github.com
Wed Apr 22 10:48:35 CEST 2020


@miconda commented on this pull request.



> @@ -1607,6 +1608,11 @@ static void trace_onreply_out(struct cell *t, int type, struct tmcb_params *ps)
 	if(msg == NULL || msg == FAKED_REPLY) {
 		msg = t->uas.request;
 		faked = 1;
+		/* check if from header has been already parsed.
+		 * If not we have to parse it in pkg memory and free iit at the end.
+		 */
+		if (msg->from && msg->from->parsed != NULL)

Should the above condition have:

```
		msg->from->parsed == NULL
```

Otherwise it should be already parsed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2295#pullrequestreview-397975958
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200422/1c05f850/attachment-0001.html>


More information about the sr-dev mailing list