[sr-dev] git:master:9b0ce4d0: dmq: fix memory leak

Andrey Rybkin rybkin.a at bks.tv
Mon Feb 2 07:31:33 CET 2015


Module: kamailio
Branch: master
Commit: 9b0ce4d0dd397e9708e3fde573804da61fd3d34e
URL: https://github.com/kamailio/kamailio/commit/9b0ce4d0dd397e9708e3fde573804da61fd3d34e

Author: Andrey Rybkin <rybkin.a at bks.tv>
Committer: Andrey Rybkin <rybkin.a at bks.tv>
Date: 2015-01-29T12:32:58+03:00

dmq: fix memory leak

---

Modified: modules/dmq/worker.c

---

Diff:  https://github.com/kamailio/kamailio/commit/9b0ce4d0dd397e9708e3fde573804da61fd3d34e.diff
Patch: https://github.com/kamailio/kamailio/commit/9b0ce4d0dd397e9708e3fde573804da61fd3d34e.patch

---

diff --git a/modules/dmq/worker.c b/modules/dmq/worker.c
index 8426730..0d25968 100644
--- a/modules/dmq/worker.c
+++ b/modules/dmq/worker.c
@@ -123,6 +123,10 @@ void worker_loop(int id)
 					del_nonshm_lump_rpl(&current_job->msg->reply_lump);
 					pkg_free(peer_response.body.s);
 				}
+				if(current_job->msg->from->parsed){
+					free_to(current_job->msg->from->parsed);
+				}
+
 				LM_DBG("sent reply\n");
 				shm_free(current_job->msg);
 				shm_free(current_job);




More information about the sr-dev mailing list