[xiph-cvs] cvs commit: vorbis/lib psy.c
Michael Smith
msmith at xiph.org
Sat Jun 29 06:13:56 PDT 2002
msmith 02/06/29 06:13:55
Modified: lib psy.c
Log:
Fix memory leak in psy code.
Revision Changes Path
1.69 +7 -2 vorbis/lib/psy.c
Index: psy.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psy.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- psy.c 2002/06/28 22:19:37 1.68
+++ psy.c 2002/06/29 13:13:54 1.69
@@ -11,7 +11,7 @@
********************************************************************
function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.68 2002/06/28 22:19:37 xiphmont Exp $
+ last mod: $Id: psy.c,v 1.69 2002/06/29 13:13:54 msmith Exp $
********************************************************************/
@@ -336,7 +336,12 @@
}
_ogg_free(p->tonecurves);
}
- _ogg_free(p->noiseoffset);
+ if(p->noiseoffset){
+ for(i=0;i<P_NOISECURVES;i++){
+ _ogg_free(p->noiseoffset[i]);
+ }
+ _ogg_free(p->noiseoffset);
+ }
memset(p,0,sizeof(*p));
}
}
<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