[xiph-commits] r7182 - trunk/theora/lib

xiphmont at dactyl.lonelymoon.com xiphmont
Mon Jul 19 20:12:00 PDT 2004


Author: xiphmont
Date: Mon Jul 19 20:12:00 2004
New Revision: 7182

Modified:
trunk/theora/lib/toplevel.c
Log:
Wrap several naked malloc()s that Conrad found in toplevel.c



Modified: trunk/theora/lib/toplevel.c
===================================================================
--- trunk/theora/lib/toplevel.c	2004-07-20 02:52:32 UTC (rev 7181)
+++ trunk/theora/lib/toplevel.c	2004-07-20 03:11:55 UTC (rev 7182)
@@ -1125,10 +1125,10 @@
oggpack_buffer *opb;

#ifndef LIBOGG2
-  opb = malloc(sizeof(oggpack_buffer));
+  opb = _ogg_malloc(sizeof(oggpack_buffer));
oggpackB_writeinit(opb);
#else
-  opb = malloc(oggpack_buffersize());
+  opb = _ogg_malloc(oggpack_buffersize());
oggpackB_writeinit(opb, ogg_buffer_create());
#endif
oggpackB_write(opb, 0x81, 8);
@@ -1364,10 +1364,10 @@
if(!op)return OC_BADHEADER;

#ifndef LIBOGG2
-  opb = malloc(sizeof(oggpack_buffer));
+  opb = _ogg_malloc(sizeof(oggpack_buffer));
oggpackB_readinit(opb,op->packet,op->bytes);
#else
-  opb = malloc(oggpack_buffersize());
+  opb = _ogg_malloc(oggpack_buffersize());
oggpackB_readinit(opb,op->packet);
#endif
{



More information about the commits mailing list