[xiph-cvs] cvs commit: Tremor framing.c vorbisfile.c
Monty
xiphmont at xiph.org
Fri Mar 28 17:20:14 PST 2003
xiphmont 03/03/28 20:20:14
Modified: . Tag: libogg2-branch framing.c vorbisfile.c
Log:
Kill a memory leak.
Monty
Revision Changes Path
No revision
<p>No revision
<p>1.4.4.2 +7 -0 Tremor/framing.c
Index: framing.c
===================================================================
RCS file: /usr/local/cvsroot/Tremor/framing.c,v
retrieving revision 1.4.4.1
retrieving revision 1.4.4.2
diff -u -r1.4.4.1 -r1.4.4.2
--- framing.c 29 Mar 2003 01:07:59 -0000 1.4.4.1
+++ framing.c 29 Mar 2003 01:20:14 -0000 1.4.4.2
@@ -42,11 +42,18 @@
finish destruction. */
/* call the helper while holding lock */
+#include <stdio.h>
static void _ogg_buffer_destroy(ogg_buffer_state *bs){
ogg_buffer *bt;
ogg_reference *rt;
if(bs->shutdown){
+
+ fprintf(stderr,"\nZero-copy pool %p lazy destroy: %d buffers outstanding.\n"
+ ,
+ bs,bs->outstanding);
+ if(!bs->outstanding)
+ fprintf(stderr,"Finishing memory cleanup of %p.\n",bs);
bt=bs->unused_buffers;
rt=bs->unused_references;
<p><p>1.4.4.2 +3 -1 Tremor/vorbisfile.c
Index: vorbisfile.c
===================================================================
RCS file: /usr/local/cvsroot/Tremor/vorbisfile.c,v
retrieving revision 1.4.4.1
retrieving revision 1.4.4.2
diff -u -r1.4.4.1 -r1.4.4.2
--- vorbisfile.c 29 Mar 2003 01:07:59 -0000 1.4.4.1
+++ vorbisfile.c 29 Mar 2003 01:20:14 -0000 1.4.4.2
@@ -12,7 +12,7 @@
********************************************************************
function: stdio-based convenience library for opening/seeking/decoding
- last mod: $Id: vorbisfile.c,v 1.4.4.1 2003/03/29 01:07:59 xiphmont Exp $
+ last mod: $Id: vorbisfile.c,v 1.4.4.2 2003/03/29 01:20:14 xiphmont Exp $
********************************************************************/
@@ -281,10 +281,12 @@
}
}
+ ogg_packet_release(&op);
ogg_page_release(&og);
return 0;
bail_header:
+ ogg_packet_release(&op);
ogg_page_release(&og);
vorbis_info_clear(vi);
vorbis_comment_clear(vc);
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list