[Asterisk-code-review] res pjsip: Fix some off nominal tdata leaks. (asterisk[master])
Richard Mudgett
asteriskteam at digium.com
Mon Feb 6 11:02:35 CST 2017
Richard Mudgett has uploaded a new change for review. ( https://gerrit.asterisk.org/4889 )
Change subject: res_pjsip: Fix some off nominal tdata leaks.
......................................................................
res_pjsip: Fix some off nominal tdata leaks.
Change-Id: I243a4be5e7fbfe604923764969c4ee04eee89b9d
---
M res/res_pjsip.c
M res/res_pjsip_mwi.c
2 files changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/89/4889/1
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 82d06dc..347c579 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -3551,6 +3551,7 @@
if (!cb && token) {
/* Silly. Without a callback we cannot do anything with token. */
+ pjsip_tx_data_dec_ref(tdata);
return PJ_EINVAL;
}
diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index 925556e..e625df7 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -502,6 +502,7 @@
body.subtype = MWI_SUBTYPE;
body_text = ast_str_create(64);
if (!body_text) {
+ pjsip_tx_data_dec_ref(tdata);
return 0;
}
@@ -517,6 +518,7 @@
if (ast_sip_pubsub_generate_body_content(body.type, body.subtype, &body_data, &body_text)) {
ast_log(LOG_WARNING, "Unable to generate SIP MWI NOTIFY body.\n");
ast_free(body_text);
+ pjsip_tx_data_dec_ref(tdata);
return 0;
}
--
To view, visit https://gerrit.asterisk.org/4889
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I243a4be5e7fbfe604923764969c4ee04eee89b9d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-code-review
mailing list