diff options
author | Monty <xiphmont@xiph.org> | 2007-06-21 23:37:15 +0000 |
---|---|---|
committer | Monty <xiphmont@xiph.org> | 2007-06-21 23:37:15 +0000 |
commit | 8f4c8c2fe7b24f7b3698f8a70ca0b86c4fa77408 (patch) | |
tree | b77ed2de63b3f04b2e98b42b3d71112024b99ea6 | |
parent | 90d6b0678e77cd237183c0183c4837a7915e66e9 (diff) | |
download | tremor-8f4c8c2fe7b24f7b3698f8a70ca0b86c4fa77408.tar.gz |
Eliminate memory leak bugs in Tremor-nobyte (closes bug 1127)
Eliminate electric fence from debug Makefile; valgrind supercedes.
git-svn-id: https://svn.xiph.org/branches/lowmem-no-byte/Tremor@13166 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | framing.c | 10 | ||||
-rw-r--r-- | misc.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index b92afa8..61ca059 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,7 +31,7 @@ example: $(MAKE) ivorbisfile_example debug: - $(MAKE) all CFLAGS="@DEBUG@" LDFLAGS="-lefence" + $(MAKE) all CFLAGS="@DEBUG@" profile: $(MAKE) all CFLAGS="@PROFILE@" @@ -53,11 +53,6 @@ static void _ogg_buffer_destroy(ogg_buffer_state *bs){ bt=bs->unused_buffers; rt=bs->unused_references; - if(!bs->outstanding){ - _ogg_free(bs); - return; - } - while(bt){ ogg_buffer *b=bt; bt=b->ptr.next; @@ -71,6 +66,10 @@ static void _ogg_buffer_destroy(ogg_buffer_state *bs){ _ogg_free(r); } bs->unused_references=0; + + if(!bs->outstanding) + _ogg_free(bs); + } } @@ -825,6 +824,7 @@ int ogg_stream_destroy(ogg_stream_state *os){ ogg_buffer_release(os->header_tail); ogg_buffer_release(os->body_tail); memset(os,0,sizeof(*os)); + _ogg_free(os); } return OGG_SUCCESS; } @@ -20,8 +20,8 @@ #include "ivorbiscodec.h" #include "os_types.h" -#define _VDBG_GRAPHFILE "_0.m" +/*#define _VDBG_GRAPHFILE "_0.m"*/ #ifdef _VDBG_GRAPHFILE extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line); |