<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Rémi Denis-Courmont wrote:
<blockquote cite="mid:200809172153.24795.rem@videolan.org" type="cite">
  <pre wrap="">Le mercredi 17 septembre 2008 21:27:19 Bill C. Riemers, vous avez écrit :
  </pre>
  <blockquote type="cite">
    <pre wrap="">The reason for FREENULL is because not all platforms correctly ignore
free(NULL).
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Hmm no. As noted by several others already, VLC's FREENULL() just frees then 
NULLifies the pointer. Hence, it is mostly useful if the pointer's own 
storage is not freed immediately afterward. It avoids dangling pointers.

  </pre>
  <blockquote type="cite">
    <pre wrap="">I hope you are certain all the platforms VLC is built on 
do correctly handle free(NULL).
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Such a brain-damaged platform does not deserve to run VLC, and it would be 
trivial to divert the brain-damaged free() to the wrapper.

  </pre>
  <blockquote type="cite">
    <pre wrap="">For example, applications I have built with unpatched Microsoft Visual
Studio 6.0 will sometimes crash and do other weird things if the program
calls free(NULL).  This particular bug was corrected in MVS 6.0 service
pack 3.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
*Fortunately*, VLC cannot be compiled with MSVC 6.

  </pre>
</blockquote>
I totally agree with Rémi.<span class="moz-smiley-s3"><span> ;-) </span></span>
</body>
</html>