[xiph-cvs] cvs commit: theora/lib comment.c

Timothy Terriberry tterribe at xiph.org
Sat Sep 27 15:25:16 PDT 2003



tterribe    03/09/27 18:25:16

  Modified:    lib      comment.c
  Log:
  Fixed memory leak in theora_comment_query().

Revision  Changes    Path
1.8       +4 -2      theora/lib/comment.c

Index: comment.c
===================================================================
RCS file: /usr/local/cvsroot/theora/lib/comment.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- comment.c	10 Jun 2003 11:34:52 -0000	1.7
+++ comment.c	27 Sep 2003 22:25:15 -0000	1.8
@@ -11,7 +11,7 @@
  ********************************************************************
 
   function: read/write and client interface for comment header packet
-  last mod: $Id: comment.c,v 1.7 2003/06/10 11:34:52 giles Exp $
+  last mod: $Id: comment.c,v 1.8 2003/09/27 22:25:15 tterribe Exp $
 
  ********************************************************************/
 
@@ -70,9 +70,11 @@
 
   for(i=0;i<tc->comments;i++){
     if(!tagcompare(tc->user_comments[i], fulltag, taglen)){
-      if(count == found)
+      if(count == found){
+        _ogg_free(fulltag);
         /* We return a pointer to the data, not a copy */
         return tc->user_comments[i] + taglen;
+      }
       else
         found++;
     }

<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