On Mon, Aug 04, 2014 at 12:24:27AM +0200, Marvin Scholz wrote: > >av_freep() should be safe to be used with NULL > > Since av_freep takes a pointer I am nearly sure that it doesn't, at > least I remember that I had some issues without the if's… But please > correct me if I'm wrong.
in the quoted code you pass the address of a pointer to av_freep() the address of a pointer is never NULL. The check checks if the pointer is NULL, which is passed to free() POSIX, says about free() that "If ptr is a null pointer, no action shall occur." http://pubs.opengroup.org/onlinepubs/9699919799/functions/free.html ill make sure this is explicitly mentioned for av_freep() and not just av_free() [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB it is not once nor twice but times without number that the same ideas make their appearance in the world. -- Aristotle
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel