lvqcl wrote:
> If realloc fails, then the previous value of pointer x is lost and we have
> memory leak. The simplest fix is to add new functions like this:
>
> static inline void *realloc_noleak_(void *ptr, size_t size)
Actually it won't fix this code in
FLAC__metadata_object_vorbiscomment_resize_comments():
else if(0 == (object->data.vorbis_comment.comments =
realloc(object->data.vorbis_comment.comments, new_size)))
return false;
because memory from object->data.vorbis_comment.comments[i].entry will leak.
_______________________________________________
flac-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/flac-dev