Skip to content

Commit

Permalink
mi_datagram: free async handler when command completed
Browse files Browse the repository at this point in the history
- reported by Torge Szczepanek, GH#298

(cherry picked from commit 374bfb1)
  • Loading branch information
miconda committed Aug 26, 2015
1 parent 48b4261 commit d495aaf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/mi_datagram/datagram_fnc.c
Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down

0 comments on commit d495aaf

Please sign in to comment.