Re: [flac-dev] Memory leaks

2015-07-04 Thread lvqcl
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_vorbiscommen

[flac-dev] Memory leaks

2015-07-04 Thread lvqcl
There are several places in libFLAC like this: if(0 == (x = realloc(x, size))) return false; and if(0 == (x = safe_realloc_mul_2op_(x, size1, size2))) { decoder_state = FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR; return false; } If realloc fails, then

Re: [Flac-dev] Memory leaks due to Metadata object vorbis comment API ???

2008-05-23 Thread Josh Coalson
sorry about the delay, I replied here: http://www.hydrogenaudio.org/forums/index.php?showtopic=63444 ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev

[Flac-dev] Memory leaks due to Metadata object vorbis comment API ???

2008-05-19 Thread Nabeel Shaheen
Hi List, I recently was assigned a task to port FLAC Encoder to our embedded platform. Thanks to OO-like design of the libFLAC and throught documentation, that porting went like a charm. I had some problems with chmod/chown like routines while porting but I was able to safely remove that piece of