<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/4015/">https://reviewboard.asterisk.org/r/4015/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I didn't have any compile problems this time.  (except for the mp3 code needing the script rerun)</pre>
 <br />







<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/4015/diff/3/?file=67607#file67607line415" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/main/file.c</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static void filestream_destructor(void *arg)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">415</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="k">if</span> <span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">filename</span><span class="p">)</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">415</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="k">if</span> <span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">filename</span><span class="p">)</span></pre></td>
  </tr>

 </tbody>


 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">416</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span><span class="n">free</span><span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">filename</span><span class="p">);</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">416</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="hl"><span class="tb">  </span><span class="tb">  </span></span><span class="n"><span class="hl">ast_</span>free</span><span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">filename</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>


 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">417</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="k">if</span> <span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">realfilename</span><span class="p">)</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">417</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="k">if</span> <span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">realfilename</span><span class="p">)</span></pre></td>
  </tr>

 </tbody>


 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">418</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span><span class="n">free</span><span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">realfilename</span><span class="p">);</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">418</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="hl"><span class="tb">  </span><span class="tb">  </span></span><span class="n"><span class="hl">ast_</span>free</span><span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">realfilename</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>


 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">419</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="k">if</span> <span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">vfs</span><span class="p">)</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">419</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="k">if</span> <span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">vfs</span><span class="p">)</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">420</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span><span class="n">ast_closestream</span><span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">vfs</span><span class="p">);</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">420</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span><span class="n">ast_closestream</span><span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">vfs</span><span class="p">);</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">421</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="k">if</span> <span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">write_buffer</span><span class="p">)</span> <span class="p">{</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">421</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="k">if</span> <span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">write_buffer</span><span class="p">)</span> <span class="p">{</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">422</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span><span class="n">ast_free</span><span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">write_buffer</span><span class="p">);</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">422</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="tb">  </span><span class="n">ast_free</span><span class="p">(</span><span class="n">f</span><span class="o">-></span><span class="n">write_buffer</span><span class="p">);</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">423</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="p">}</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">423</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="p">}</span></pre></td>
  </tr>

 </tbody>


 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">424</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="k"><span class="hl">if</span></span><span class="hl"> </span><span class="p"><span class="hl">(</span></span><span class="n">f</span><span class="o">-></span><span class="n">orig_chan_name</span><span class="p">)</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">424</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="hl"><span class="tb">  </span></span><span class="n"><span class="hl">ast_free</span></span><span class="p"><span class="hl">((</span></span><span class="kt"><span class="hl">void</span></span><span class="hl"> </span><span class="o"><span class="hl">*</span></span><span class="p"><span class="hl">)</span></span><span class="n">f</span><span class="o">-></span><span class="n">orig_chan_name</span><span class="p">)<span class="hl">;</span></span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Since you removed the redundant if to one ast_free here you might as well do it to the other three.</pre>
</div>
<br />



<p>- rmudgett</p>


<br />
<p>On September 25th, 2014, 5 p.m. CDT, wdoekes wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By wdoekes.</div>


<p style="color: grey;"><i>Updated Sept. 25, 2014, 5 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-24348">ASTERISK-24348</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">After having a bit of an issue with free() being defined as ast_free()
without it being obvious, as can be seen here
http://lists.digium.com/pipermail/asterisk-commits/2014-September/070353.html ,
I decided to abolish the use of free() (without ast_-prefix) wherever
reasonably possible.


The diff speaks for itself.

I added the define WRAP_LIBC_MALLOC to allow free() to mean ast_free()
and so on. See this:
https://reviewboard.asterisk.org/r/4015/diff/#28

If that is *not* defined, and "asterisk.h" is included, then free()
and friends will throw compile errors like this:

  mpool/mpool.c:291:3: error: implicit declaration of function
  ‘Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory’
  [-Werror=implicit-function-declaration]


That variable is defined for the cases where either STANDALONE
behaviour is expected (utils stuff) or code is autogenerated (lexer stuff).</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It compiles.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/utils/extconf.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/tests/test_dlinklists.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/res/res_smdi.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/res/res_rtp_asterisk.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/res/res_pktccops.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/res/res_phoneprov.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/res/res_config_ldap.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/res/ael/pval.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/res/ael/ael_lex.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/res/ael/ael.y <span style="color: grey">(423893)</span></li>

 <li>/trunk/res/ael/ael.tab.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/res/ael/ael.flex <span style="color: grey">(423893)</span></li>

 <li>/trunk/pbx/pbx_config.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/main/tdd.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/main/loader.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/main/hashtab.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/main/file.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/main/autoservice.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/main/ast_expr2f.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/main/ast_expr2.y <span style="color: grey">(423893)</span></li>

 <li>/trunk/main/ast_expr2.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/main/app.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/main/acl.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/include/asterisk/astmm.h <span style="color: grey">(423893)</span></li>

 <li>/trunk/funcs/func_curl.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/contrib/scripts/get_mp3_source.sh <span style="color: grey">(423893)</span></li>

 <li>/trunk/channels/chan_skinny.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/channels/chan_mgcp.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/channels/chan_console.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/cel/cel_tds.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/apps/app_queue.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/apps/app_jack.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/ooh323cDriver.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/ooh323c/src/printHandler.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/ooh323c/src/oochannels.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/ooh323c/src/ooStackCmds.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/ooh323c/src/ooCmdChannel.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/ooh323c/src/ooCalls.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/ooh323c/src/memheap.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/ooh323c/src/errmgmt.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/ooh323c/src/context.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/chan_ooh323.c <span style="color: grey">(423893)</span></li>

 <li>/trunk/addons/app_mysql.c <span style="color: grey">(423893)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/4015/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>