[Ffmpeg-devel] [PATCH] http.c: http_connect() memleak

Måns Rullgård mru
Wed Jul 19 10:51:28 CEST 2006

I. Po said:
> Hi,
> On 7/18/06, Herv? W. <H.O.W.aka.V+ffmpeg at gmail.com> wrote:
>> > > patch ok if you use av_freep() and drop the NULL check
>> > As I know, null-free is safe only from C99, but corrected the patch.
>> av_freep() calls av_free() which checks for NULL for you.
> I checked, there is no NULL check. There is ZERO check, but C-standart
> tell as that they are not equal.

Great.  Now we can have a discussion about the terms "null pointer", "null
pointer constant", and "NULL".

A constant expression evaluating to 0 is a null pointer pointer constant,
as is the macro NULL.  A comparison between a null pointer and zero,
explicitly or implicitly, has a non-zero value.

The code is correct.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list