Module: kamailio Branch: master Commit: 374bfb1c467d6bf2a4cc143d22868c37143783bd URL: https://github.com/kamailio/kamailio/commit/374bfb1c467d6bf2a4cc143d22868c37...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2015-08-25T16:12:51+02:00
mi_datagram: free async handler when command completed
- reported by Torge Szczepanek, GH#298
---
Modified: modules/mi_datagram/datagram_fnc.c
---
Diff: https://github.com/kamailio/kamailio/commit/374bfb1c467d6bf2a4cc143d22868c37... Patch: https://github.com/kamailio/kamailio/commit/374bfb1c467d6bf2a4cc143d22868c37...
---
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; }