[flac-dev] [PATCH] for potential memory leaks

Erik de Castro Lopo mle+la at mega-nerd.com
Sat Aug 22 03:30:44 PDT 2015


lvqcl wrote:

> I noticed that your patch removes the call to vorbiscomment_entry_array_delete_()
> in FLAC__metadata_object_vorbiscomment_resize_comments() function, and I think
> that it reintroduces one place of a potential memory leak:
> 
> 'object->data.vorbis_comment.comments' is a pointer to an array of
> FLAC__StreamMetadata_VorbisComment_Entry structs, and these structs contain pointers.
> So it's necessary to free all 'object->data.vorbis_comment.comments[i].entry' pointers
> before freeing 'object->data.vorbis_comment.comments' pointer itself.

Thanks. Fixed!

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list