Module: kamailio
Branch: 4.3
Commit: d495aafb98d3560c36b681dae21b671ce8b23e86
URL:
https://github.com/kamailio/kamailio/commit/d495aafb98d3560c36b681dae21b671…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-08-26T13:21:21+02:00
mi_datagram: free async handler when command completed
- reported by Torge Szczepanek, GH#298
(cherry picked from commit 374bfb1c467d6bf2a4cc143d22868c37143783bd)
---
Modified: modules/mi_datagram/datagram_fnc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d495aafb98d3560c36b681dae21b671…
Patch:
https://github.com/kamailio/kamailio/commit/d495aafb98d3560c36b681dae21b671…
---
diff --git a/modules/mi_datagram/datagram_fnc.c b/modules/mi_datagram/datagram_fnc.c
index 0309b73..8e2ed71 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;
}