[xiph-commits] r8263 - trunk/vorbis-tools/vorbiscomment

msmith at motherfish-iii.xiph.org msmith at motherfish-iii.xiph.org
Mon Nov 22 22:09:21 PST 2004


Author: msmith
Date: 2004-11-22 22:09:20 -0800 (Mon, 22 Nov 2004)
New Revision: 8263

Modified:
   trunk/vorbis-tools/vorbiscomment/vcedit.c
Log:
Use _ogg_free(), not ogg_packet_clear(), to prevent cross-DLL windows memory
management issues



Modified: trunk/vorbis-tools/vorbiscomment/vcedit.c
===================================================================
--- trunk/vorbis-tools/vorbiscomment/vcedit.c	2004-11-23 02:43:09 UTC (rev 8262)
+++ trunk/vorbis-tools/vorbiscomment/vcedit.c	2004-11-23 06:09:20 UTC (rev 8263)
@@ -483,8 +483,11 @@
 
 cleanup:
 	ogg_stream_clear(&streamout);
-	ogg_packet_clear(&header_comments);
 
+    /* We don't ogg_packet_clear() this, because the memory was allocated in
+       _commentheader_out(), so we mirror that here */
+    _ogg_free(header_comments.packet);
+
 	free(state->mainbuf);
 	free(state->bookbuf);
     state->mainbuf = state->bookbuf = NULL;



More information about the commits mailing list