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/trunk@198248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp 2009-05-30 02:31:48 +00:00
parent 453a2f7331
commit 5c8626e315
1 changed files with 3 additions and 0 deletions

View File

@ -3079,6 +3079,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);
}