<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6151">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Correct some leaks in unit tests.<br><br>* chan_sip: channel in test_sip_rtpqos_1.<br>* test_config: config hook, config info and global config holder.<br>* test_core_format: format in format_attribute_set_without_interface.<br>* test_stream: unneeded frame duplication.<br>* test_taskprocessor: task_data.<br><br>Change-Id: I94d364d195cf3b3b5de2bf3ad565343275c7ad31<br>---<br>M channels/sip/dialplan_functions.c<br>M tests/test_config.c<br>M tests/test_core_format.c<br>M tests/test_taskprocessor.c<br>4 files changed, 11 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c<br>index b859c60..af443fd 100644<br>--- a/channels/sip/dialplan_functions.c<br>+++ b/channels/sip/dialplan_functions.c<br>@@ -486,6 +486,9 @@<br>          dialog_unlink_all(p);<br>                 dialog_unref(p, "Destroy test object");<br>     }<br>+    if (chan) {<br>+          ast_channel_unref(chan);<br>+     }<br>     ast_rtp_engine_unregister(&test_engine);<br>  return res;<br> }<br>diff --git a/tests/test_config.c b/tests/test_config.c<br>index 602c3e7..8fb4735 100644<br>--- a/tests/test_config.c<br>+++ b/tests/test_config.c<br>@@ -1040,6 +1040,7 @@<br>   res = AST_TEST_PASS;<br> <br> out:<br>+       ast_config_hook_unregister("test_hook");<br>    delete_config_file();<br>         return res;<br> }<br>@@ -1677,6 +1678,8 @@<br>        configs.codeccapopt = NULL;<br>   ast_string_field_free_memory(&defaults);<br>  ast_string_field_free_memory(&configs);<br>+  aco_info_destroy(&cfg_info);<br>+     ao2_global_obj_release(global_obj);<br>   return res;<br> }<br> <br>diff --git a/tests/test_core_format.c b/tests/test_core_format.c<br>index a3819c6..e4199db 100644<br>--- a/tests/test_core_format.c<br>+++ b/tests/test_core_format.c<br>@@ -860,6 +860,7 @@<br> {<br>  RAII_VAR(struct ast_codec *, codec, NULL, ao2_cleanup);<br>       RAII_VAR(struct ast_format *, format, NULL, ao2_cleanup);<br>+    struct ast_format *attr_set;<br> <br>       switch (cmd) {<br>        case TEST_INIT:<br>@@ -885,10 +886,12 @@<br>                return AST_TEST_FAIL;<br>         }<br> <br>- if (!ast_format_attribute_set(format, "bees", "cool")) {<br>+ attr_set = ast_format_attribute_set(format, "bees", "cool");<br>+     if (!attr_set) {<br>              ast_test_status_update(test, "Successfully set an attribute on a format without an interface\n");<br>           return AST_TEST_FAIL;<br>         }<br>+    ao2_cleanup(attr_set);<br> <br>     return AST_TEST_PASS;<br> }<br>diff --git a/tests/test_taskprocessor.c b/tests/test_taskprocessor.c<br>index be48f92..ad2074c 100644<br>--- a/tests/test_taskprocessor.c<br>+++ b/tests/test_taskprocessor.c<br>@@ -677,7 +677,7 @@<br> {<br>   RAII_VAR(struct ast_taskprocessor *, tps, NULL,<br>               ast_taskprocessor_unreference);<br>-      struct task_data *task_data;<br>+ RAII_VAR(struct task_data *, task_data, NULL, ao2_cleanup);<br>   int local_data;<br>       int res;<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6151">change 6151</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/6151"/><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: I94d364d195cf3b3b5de2bf3ad565343275c7ad31 </div>
<div style="display:none"> Gerrit-Change-Number: 6151 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>