[xiph-cvs] cvs commit: vorbis/lib time0.c

Michael Smith msmith at xiph.org
Sun Jun 9 07:27:01 PDT 2002



msmith      02/06/09 07:27:01

  Modified:    lib      time0.c
  Log:
  memleak fix that I forgot to commit ~2 months ago.

Revision  Changes    Path
1.14      +7 -5      vorbis/lib/time0.c

Index: time0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/time0.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- time0.c	2002/03/30 14:11:53	1.13
+++ time0.c	2002/06/09 14:27:01	1.14
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: time backend 0 (dummy)
- last mod: $Id: time0.c,v 1.13 2002/03/30 14:11:53 msmith Exp $
+ last mod: $Id: time0.c,v 1.14 2002/06/09 14:27:01 msmith Exp $
 
  ********************************************************************/
 
@@ -25,17 +25,19 @@
 static void time0_pack (vorbis_info_time *i,oggpack_buffer *opb){
 }
 static vorbis_info_time *time0_unpack (vorbis_info *vi,oggpack_buffer *opb){
-  return "";
-
+  /* We have to return non-NULL here, so this will do. */
+  return malloc(4);
 }
 static vorbis_info_time *time0_copy_info (vorbis_info_time *vi){
-  return "";
+  return NULL;
 }
 static vorbis_look_time *time0_look (vorbis_dsp_state *vd,vorbis_info_mode *mi,
                               vorbis_info_time *i){
-  return "";
+  return NULL;
 }
 static void time0_free_info(vorbis_info_time *i){
+  if(i)  
+    free(i);
 }
 static void time0_free_look(vorbis_look_time *i){
 }

<p><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