aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 608f78b08..f4ec29c2c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3194,8 +3194,10 @@ static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, int seqno, int res
if (xmitres == XMIT_ERROR) { /* Serious network trouble, no need to try again */
append_history(pkt->owner, "XmitErr", "%s", pkt->is_fatal ? "(Critical)" : "(Non-critical)");
ast_log(LOG_ERROR, "Serious Network Trouble; __sip_xmit returns error for pkt data\n");
- if (pkt->data)
- ast_free(pkt->data);
+ AST_SCHED_DEL(sched, pkt->retransid);
+ p->packets = pkt->next;
+ ast_free(pkt->data);
+ ast_free(pkt);
return AST_FAILURE;
} else {
return AST_SUCCESS;