Change-Id: I243a4be5e7fbfe604923764969c4ee04eee89b9d
if (!cb && token) {
/* Silly. Without a callback we cannot do anything with token. */
+ pjsip_tx_data_dec_ref(tdata);
return PJ_EINVAL;
}
body.subtype = MWI_SUBTYPE;
body_text = ast_str_create(64);
if (!body_text) {
+ pjsip_tx_data_dec_ref(tdata);
return 0;
}
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;
}