]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixes crash in chan_iax2.
authorDavid Vossel <dvossel@digium.com>
Tue, 2 Aug 2011 16:15:08 +0000 (16:15 +0000)
committerDavid Vossel <dvossel@digium.com>
Tue, 2 Aug 2011 16:15:08 +0000 (16:15 +0000)
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

channels/chan_iax2.c

index 6f2f4e1db623626b32f279abce60ef8e66a5c35c..396fbbe1e54e299e37515fc1a802c6a00aa17c37 100644 (file)
@@ -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);
 }