[asterisk-commits] res pjsip: Fix some off nominal tdata leaks. (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 7 08:42:16 CST 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4887 )
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(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index e4a9b98..9375893 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -3549,6 +3549,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 fb6e6b8..5ae2af5 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/4887
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I243a4be5e7fbfe604923764969c4ee04eee89b9d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
More information about the asterisk-commits
mailing list