diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-30 02:31:48 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-30 02:31:48 +0000 |
commit | 222b494c0212825f11ffe1162ff5808b371b9ecd (patch) | |
tree | 79bee0249dc35f591d2e9018ee5c7a9cde99a432 /channels/chan_sip.c | |
parent | e69b8d20c38b3d01dcdb70c9db3f6c7781c3b647 (diff) |
When removing all packets from a dialog we also need to free the data if present.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198248 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index fe6fd070c..fe362b805 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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); } |