]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 198248 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Sat, 30 May 2009 02:34:12 +0000 (02:34 +0000)
committerJoshua Colp <jcolp@digium.com>
Sat, 30 May 2009 02:34:12 +0000 (02:34 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r198248 | file | 2009-05-29 23:31:48 -0300 (Fri, 29 May 2009) | 2 lines

  When removing all packets from a dialog we also need to free the data if present.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@198249 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index bed16259cd45e050d1edc90c6faf84081fbac8dd..7e7e9d8390a8832acb217a0ec3ae798fc56b8fec 100644 (file)
@@ -2572,6 +2572,9 @@ static void *dialog_unlink_all(struct sip_pvt *dialog, int lockowner, int lockdi
                dialog->packets = dialog->packets->next;
                AST_SCHED_DEL(sched, cp->retransid);
                dialog_unref(cp->owner, "remove all current packets in this dialog, and the pointer to the dialog too as part of __sip_destroy");
+               if (cp->data) {
+                       ast_free(cp->data);
+               }
                ast_free(cp);
        }