mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
res_pjsip, res_pjsip_session: initialize local variables
This patch initializes a couple of local variables to some default values. Interestingly, in the 'pj_status_t dlg_status' case the value not being initialized caused memory to grow, and not be recovered, in the off nominal path (at least on my machine). Change-Id: I22ee65e1e1bff8efacea8a167c6c8428898523f7
This commit is contained in:
committed by
George Joseph
parent
f3452c85e5
commit
c62193c5de
@@ -78,7 +78,7 @@ static void keepalive_transport_send_keepalive(struct monitored_transport *monit
|
|||||||
static void *keepalive_transport_thread(void *data)
|
static void *keepalive_transport_thread(void *data)
|
||||||
{
|
{
|
||||||
struct ao2_container *transports;
|
struct ao2_container *transports;
|
||||||
pj_thread_desc desc;
|
pj_thread_desc desc = { 0 };
|
||||||
pj_thread_t *thread;
|
pj_thread_t *thread;
|
||||||
|
|
||||||
if (pj_thread_register("Asterisk Keepalive Thread", desc, &thread) != PJ_SUCCESS) {
|
if (pj_thread_register("Asterisk Keepalive Thread", desc, &thread) != PJ_SUCCESS) {
|
||||||
|
@@ -3747,7 +3747,7 @@ static pjsip_inv_session *pre_session_setup(pjsip_rx_data *rdata, const struct a
|
|||||||
pjsip_dialog *dlg;
|
pjsip_dialog *dlg;
|
||||||
pjsip_inv_session *inv_session;
|
pjsip_inv_session *inv_session;
|
||||||
unsigned int options = endpoint->extensions.flags;
|
unsigned int options = endpoint->extensions.flags;
|
||||||
pj_status_t dlg_status;
|
pj_status_t dlg_status = PJ_EUNKNOWN;
|
||||||
|
|
||||||
if (pjsip_inv_verify_request(rdata, &options, NULL, NULL, ast_sip_get_pjsip_endpoint(), &tdata) != PJ_SUCCESS) {
|
if (pjsip_inv_verify_request(rdata, &options, NULL, NULL, ast_sip_get_pjsip_endpoint(), &tdata) != PJ_SUCCESS) {
|
||||||
if (tdata) {
|
if (tdata) {
|
||||||
|
Reference in New Issue
Block a user