[FFmpeg-devel] [PATCH] Doxygenate libavutil/mem.h

Stefano Sabatini stefano.sabatini-lala
Fri Nov 2 17:11:24 CET 2007


On date Friday 2007-11-02 15:55:25 +0100, Michael Niedermayer encoded:
> On Thu, Nov 01, 2007 at 09:25:11PM +0100, Stefano Sabatini wrote:
[...]
> > Thanks for your review, hope now it is more correct.
> 
> looks ok

AAAARGH, where did I left my head!!

/**
- * Free memory and set the pointer to NULL.
- * @param ptr Pointer to the pointer which should be freed.
+ * Free a memory block which has been allocated with av_malloc(z)() or
+ * av_realloc() and set to NULL the pointer to it.
+ * @param ptr Pointer to the pointer to the memory block which should
+ * be freed.
+ * @note ptr = NULL is explicitly allowed.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wrong since it will cause NULL pointer dereference in the code.

New patch and new personal record in subsequently sent wrong patches
;-).

Best regards and sorry for the noise.
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doxygenate-mem-h-10.patch
Type: text/x-diff
Size: 2723 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071102/510cd3c5/attachment.patch>



More information about the ffmpeg-devel mailing list