mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
res_pjsip: Fix tdata leaks in off nominal paths.
Change-Id: Ie83e06e88c2d60157775263b07e40b61718ac97b
This commit is contained in:
@@ -514,6 +514,7 @@ static pj_status_t registration_client_send(struct sip_outbound_registration_cli
|
||||
|
||||
callback_invoked = ast_threadstorage_get(®ister_callback_invoked, sizeof(int));
|
||||
if (!callback_invoked) {
|
||||
pjsip_tx_data_dec_ref(tdata);
|
||||
return PJ_ENOMEM;
|
||||
}
|
||||
*callback_invoked = 0;
|
||||
@@ -567,6 +568,7 @@ static int handle_client_registration(void *data)
|
||||
/* insert a new Supported header */
|
||||
hdr = pjsip_supported_hdr_create(tdata->pool);
|
||||
if (!hdr) {
|
||||
pjsip_tx_data_dec_ref(tdata);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user