<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7078">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_outbound_registration: Fix leak on vector add failure.<br><br>Change-Id: I774b88b3c9da41edd4dc8d78f095481f52f2bd46<br>---<br>M res/res_pjsip_outbound_registration.c<br>1 file changed, 3 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/78/7078/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c<br>index 7fa6e2c..d9afcd2 100644<br>--- a/res/res_pjsip_outbound_registration.c<br>+++ b/res/res_pjsip_outbound_registration.c<br>@@ -1385,10 +1385,10 @@<br> <br>     AST_VECTOR_INIT(&state->client_state->outbound_auths, AST_VECTOR_SIZE(&registration->outbound_auths));<br>       for (i = 0; i < AST_VECTOR_SIZE(&registration->outbound_auths); ++i) {<br>-             const char *name = ast_strdup(AST_VECTOR_GET(&registration->outbound_auths, i));<br>+              char *name = ast_strdup(AST_VECTOR_GET(&registration->outbound_auths, i));<br> <br>-         if (name) {<br>-                  AST_VECTOR_APPEND(&state->client_state->outbound_auths, name);<br>+             if (name && AST_VECTOR_APPEND(&state->client_state->outbound_auths, name)) {<br>+                       ast_free(name);<br>               }<br>     }<br>     state->client_state->retry_interval = registration->retry_interval;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7078">change 7078</a>. To unsubscribe, 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/7078"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I774b88b3c9da41edd4dc8d78f095481f52f2bd46 </div>
<div style="display:none"> Gerrit-Change-Number: 7078 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>