<p>George Joseph <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15084">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip, res_pjsip_session: initialize local variables<br><br>This patch initializes a couple of local variables to some default values.<br>Interestingly, in the 'pj_status_t dlg_status' case the value not being<br>initialized caused memory to grow, and not be recovered, in the off nominal<br>path (at least on my machine).<br><br>Change-Id: I22ee65e1e1bff8efacea8a167c6c8428898523f7<br>---<br>M res/res_pjsip/pjsip_transport_management.c<br>M res/res_pjsip_session.c<br>2 files changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip/pjsip_transport_management.c b/res/res_pjsip/pjsip_transport_management.c</span><br><span>index af572d3..e14c8e9 100644</span><br><span>--- a/res/res_pjsip/pjsip_transport_management.c</span><br><span>+++ b/res/res_pjsip/pjsip_transport_management.c</span><br><span>@@ -78,7 +78,7 @@</span><br><span> static void *keepalive_transport_thread(void *data)</span><br><span> {</span><br><span>   struct ao2_container *transports;</span><br><span style="color: hsl(0, 100%, 40%);">-       pj_thread_desc desc;</span><br><span style="color: hsl(120, 100%, 40%);">+  pj_thread_desc desc = { 0 };</span><br><span>         pj_thread_t *thread;</span><br><span> </span><br><span>     if (pj_thread_register("Asterisk Keepalive Thread", desc, &thread) != PJ_SUCCESS) {</span><br><span>diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c</span><br><span>index 82234aa..ec01145 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -3747,7 +3747,7 @@</span><br><span>   pjsip_dialog *dlg;</span><br><span>   pjsip_inv_session *inv_session;</span><br><span>      unsigned int options = endpoint->extensions.flags;</span><br><span style="color: hsl(0, 100%, 40%);">-   pj_status_t dlg_status;</span><br><span style="color: hsl(120, 100%, 40%);">+       pj_status_t dlg_status = PJ_EUNKNOWN;</span><br><span> </span><br><span>    if (pjsip_inv_verify_request(rdata, &options, NULL, NULL, ast_sip_get_pjsip_endpoint(), &tdata) != PJ_SUCCESS) {</span><br><span>             if (tdata) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15084">change 15084</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/15084"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I22ee65e1e1bff8efacea8a167c6c8428898523f7 </div>
<div style="display:none"> Gerrit-Change-Number: 15084 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>