<p>Kevin Harwell <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10714">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">test_cel: Plug a few ref leaks<br><br>These are only a few of the leaks. The large number of macros<br>and return paths in this file would make a weeks worth of work<br>to plug them all.<br><br>Change-Id: Ie2369fa944023d44767871c5c30974cb077ffb56<br>---<br>M tests/test_cel.c<br>1 file changed, 10 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/test_cel.c b/tests/test_cel.c</span><br><span>index 1461f76..5410d73 100644</span><br><span>--- a/tests/test_cel.c</span><br><span>+++ b/tests/test_cel.c</span><br><span>@@ -1792,7 +1792,7 @@</span><br><span> </span><br><span> static void test_sub(struct ast_event *event)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- struct ast_event *event_dup = ao2_dup_event(event);</span><br><span style="color: hsl(120, 100%, 40%);">+ RAII_VAR(struct ast_event *, event_dup, ao2_dup_event(event), ao2_cleanup);</span><br><span> const char *chan_name;</span><br><span> SCOPED_MUTEX(mid_test_lock, &mid_test_sync_lock);</span><br><span> </span><br><span>@@ -1857,11 +1857,15 @@</span><br><span> */</span><br><span> static int test_cel_peer_strings_match(const char *str1, const char *str2)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- struct ao2_container *intersection = ast_str_container_alloc(11);</span><br><span style="color: hsl(120, 100%, 40%);">+ RAII_VAR(struct ao2_container *, intersection, ast_str_container_alloc(11), ao2_cleanup);</span><br><span> RAII_VAR(char *, str1_dup, ast_strdup(str1), ast_free);</span><br><span> RAII_VAR(char *, str2_dup, ast_strdup(str2), ast_free);</span><br><span> char *chan;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (!intersection) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return 1;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> while ((chan = strsep(&str1_dup, ","))) {</span><br><span> ast_str_container_add(intersection, chan);</span><br><span> }</span><br><span>@@ -2142,6 +2146,10 @@</span><br><span> </span><br><span> ast_channel_unregister(&test_cel_chan_tech);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(cel_expected_events);</span><br><span style="color: hsl(120, 100%, 40%);">+ cel_expected_events = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(cel_received_events);</span><br><span style="color: hsl(120, 100%, 40%);">+ cel_received_events = NULL;</span><br><span> ao2_cleanup(cel_test_config);</span><br><span> cel_test_config = NULL;</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10714">change 10714</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/10714"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ie2369fa944023d44767871c5c30974cb077ffb56 </div>
<div style="display:none"> Gerrit-Change-Number: 10714 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>