Commit 384501d0 authored by Monty's avatar Monty

Eliminate memory leak bugs in Tremor-lowmem (closes bug 1127)

Eliminate electric fence from debug Makefile; valgrind supercedes.



git-svn-id: https://svn.xiph.org/branches/lowmem-branch/Tremor@13165 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent e50e19f9
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment