[Asterisk-code-review] res pjsip mwi: Fix null pointer crash (asterisk[13])
Joshua Elson
asteriskteam at digium.com
Thu Feb 1 13:01:58 CST 2018
Joshua Elson has uploaded this change for review. ( https://gerrit.asterisk.org/8132
Change subject: res_pjsip_mwi: Fix null pointer crash
......................................................................
res_pjsip_mwi: Fix null pointer crash
Change-Id: I78a0d38bfd8d0d82830f3d53da04872d6b67284d
---
M res/res_pjsip_mwi.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/32/8132/1
diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index 05eee78..00778d7 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -650,7 +650,7 @@
.body_type = AST_SIP_MESSAGE_ACCUMULATOR,
.body_data = &counter,
};
- const char *resource = ast_sip_subscription_get_resource_name(sub->sip_sub);
+ const char *resource = sub->is_solicited ? ast_sip_subscription_get_resource_name(sub->sip_sub) : NULL;
ao2_callback(sub->stasis_subs, OBJ_NODATA, get_message_count, &counter);
--
To view, visit https://gerrit.asterisk.org/8132
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78a0d38bfd8d0d82830f3d53da04872d6b67284d
Gerrit-Change-Number: 8132
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Elson <joshelson at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180201/d878571b/attachment-0001.html>
More information about the asterisk-code-review
mailing list