Displaying 1 result from an estimated 1 matches for "noleak".
Did you mean:
noleaf
2012 May 14
0
Memory Leak in vorbis_info_clear()
...ention this. I tried, but it didn't look like
I could make the edit.
My solution is to clear in reverse order of initialization, though I've
rearranged the order of things in the example program to highlight the
immediate issue.
/* compile: cc -Wall -o vbs vbs.c -lvorbisenc -lvorbis */
/* noleak: valgrind --leak-check=yes ./vbs */
/* leak: valgrind --leak-check=yes ./vbs -l */
#include <unistd.h> /* getopt(3) */
#include <vorbis/codec.h>
#include <vorbis/vorbisenc.h>
static struct vorbis_info info;
static struct vorbis_dsp_state dsp;
static struct vorbis_comment co...