From: David Vossel Date: Tue, 2 Aug 2011 16:15:08 +0000 (+0000) Subject: Fixes crash in chan_iax2. X-Git-Tag: 1.8.6.0-rc1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a0faafc262fc073359afd503d5735aa7d5e78a0;p=thirdparty%2Fasterisk.git Fixes crash in chan_iax2. Fixes crash in chan_iax2 resulting from an edge case in the way control frames are queued during calltoken negotiation is complete. (closes issue ASTERISK-17610) Reported by: mgrobecker git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@330581 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 6f2f4e1db6..396fbbe1e5 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -1818,7 +1818,9 @@ static int scheduled_destroy(const void *vid) static void free_signaling_queue_entry(struct signaling_queue_entry *s) { - ast_free(s->f.data.ptr); + if (s->f.datalen) { + ast_free(s->f.data.ptr); + } ast_free(s); }