Module: kamailio
Branch: 4.2
Commit: a4ca8feae11a8168ab600b2a648f85af1e792661
URL:
https://github.com/kamailio/kamailio/commit/a4ca8feae11a8168ab600b2a648f85a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-08-26T13:22:09+02:00
mi_datagram: free async handler when command completed
- reported by Torge Szczepanek, GH#298
(cherry picked from commit 374bfb1c467d6bf2a4cc143d22868c37143783bd)
(cherry picked from commit d495aafb98d3560c36b681dae21b671ce8b23e86)
---
Modified: modules/mi_datagram/datagram_fnc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a4ca8feae11a8168ab600b2a648f85a…
Patch:
https://github.com/kamailio/kamailio/commit/a4ca8feae11a8168ab600b2a648f85a…
---
diff --git a/modules/mi_datagram/datagram_fnc.c b/modules/mi_datagram/datagram_fnc.c
index 8470ddb..eca74f3 100644
--- a/modules/mi_datagram/datagram_fnc.c
+++ b/modules/mi_datagram/datagram_fnc.c
@@ -359,6 +359,7 @@ static void datagram_close_async(struct mi_root *mi_rpl,struct
mi_handler *hdl,
}
free_mi_tree(mi_rpl);
pkg_free(dtgram.start);
+ if (done) free_async_handler( hdl );
} else if (done) {
mi_send_dgram(reply_sock, MI_COMMAND_FAILED, MI_COMMAND_FAILED_LEN,
(struct sockaddr*)&reply_addr, reply_addr_len, mi_socket_timeout);
@@ -372,6 +373,7 @@ static void datagram_close_async(struct mi_root *mi_rpl,struct
mi_handler *hdl,
if(dtgram.start)
pkg_free(dtgram.start);
close(reply_sock);
+ if (done) free_async_handler( hdl );
return;
}