diff options
author | Richard Mudgett <rmudgett@digium.com> | 2017-02-01 17:56:13 -0600 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2017-02-06 10:59:59 -0600 |
commit | c384dfd6b086231d9bbc59fbe6047527d34fb37d (patch) | |
tree | f79d8c17c914a02b1cf2336d868f501c2a270017 | |
parent | 431923feb6167b2536ba0f72ff3954c0b06ae402 (diff) |
res_pjsip: Fix some off nominal tdata leaks.
Change-Id: I243a4be5e7fbfe604923764969c4ee04eee89b9d
-rw-r--r-- | res/res_pjsip.c | 1 | ||||
-rw-r--r-- | res/res_pjsip_mwi.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index e4a9b9869..9375893d3 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -3549,6 +3549,7 @@ static pj_status_t endpt_send_request(struct ast_sip_endpoint *endpoint, 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 fb6e6b8f6..5ae2af5d3 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; } |