diff options
author | Richard Mudgett <rmudgett@digium.com> | 2017-02-01 17:56:13 -0600 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2017-02-06 11:02:35 -0600 |
commit | b47cf1a7d6aba11b145b14883e8c607362756001 (patch) | |
tree | 911da81e9de63e4df8e8b9e4d300b97029b4436d /res/res_pjsip_mwi.c | |
parent | 7b280e7ccf326de80b183c4fe305b5ecfaa2094a (diff) |
res_pjsip: Fix some off nominal tdata leaks.
Change-Id: I243a4be5e7fbfe604923764969c4ee04eee89b9d
Diffstat (limited to 'res/res_pjsip_mwi.c')
-rw-r--r-- | res/res_pjsip_mwi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c index 925556ed4..e625df77a 100644 --- a/res/res_pjsip_mwi.c +++ b/res/res_pjsip_mwi.c @@ -502,6 +502,7 @@ static int send_unsolicited_mwi_notify_to_contact(void *obj, void *arg, int flag 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 @@ static int send_unsolicited_mwi_notify_to_contact(void *obj, void *arg, int flag 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; } |