summaryrefslogtreecommitdiff
path: root/src/framing.c
diff options
context:
space:
mode:
authorConrad Parker <conrad@xiph.org>2004-08-19 02:06:02 +0000
committerConrad Parker <conrad@xiph.org>2004-08-19 02:06:02 +0000
commit822899d4c706a6f23437bd57e99c26b05f562aba (patch)
tree90b65c5183a89d0abd35c80d88040a6f78f2d89e /src/framing.c
parent83ae7e6fadc077c38784d32308369d2a2c8d1a24 (diff)
downloadogg-git-822899d4c706a6f23437bd57e99c26b05f562aba.tar.gz
free memory allocated in testing routines, to allow checks to pass in
leak-checking environments svn path=/trunk/ogg/; revision=7586
Diffstat (limited to 'src/framing.c')
-rw-r--r--src/framing.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/framing.c b/src/framing.c
index 69adb86..c8cf2c9 100644
--- a/src/framing.c
+++ b/src/framing.c
@@ -1002,6 +1002,11 @@ void copy_page(ogg_page *og){
og->body=temp;
}
+void free_page(ogg_page *og){
+ _ogg_free (og->header);
+ _ogg_free (og->body);
+}
+
void error(void){
fprintf(stderr,"error!\n");
exit(1);
@@ -1734,6 +1739,13 @@ int main(void){
fprintf(stderr,"ok.\n");
}
+
+ /* Free page data that was previously copied */
+ {
+ for(i=0;i<5;i++){
+ free_page(&og[i]);
+ }
+ }
}
return(0);