benchmorc: Fix memory leaks in test
authorSebastian Dröge <sebastian@centricular.com>
Sun, 13 Apr 2014 19:57:59 +0000 (21:57 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Sun, 13 Apr 2014 19:57:59 +0000 (21:57 +0200)
testsuite/benchmorc/benchmorc.c

index 0703b6e..b27354e 100644 (file)
@@ -39,6 +39,7 @@ main (int argc, char *argv[])
   }
 
   n = orc_parse (code, &programs);
+  free (code);
 
 #if 0
   sum = 0;
@@ -69,7 +70,9 @@ main (int argc, char *argv[])
     /* weight = weights_n900[i]; */
 
     sum += weight * perf;
+    orc_program_free (programs[i]);
   }
+  free (programs);
   printf("score %g\n", 100.0/sum);
 #endif