correlations: Fix memory leak
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 11 Aug 2010 19:31:20 +0000 (21:31 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 11 Aug 2010 19:31:20 +0000 (21:31 +0200)
src/language/stats/correlations.c

index 995675e2cbf4b36cecab0e37ba7374df8e30c9a3..ea7d6909bb9844e3893ccf343920faa8477dace0 100644 (file)
@@ -498,10 +498,13 @@ cmd_correlation (struct lexer *lexer, struct dataset *ds)
 
 
   /* Done. */
+  free (corr->vars);
   free (corr);
+
   return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
 
  error:
+  free (corr->vars);
   free (corr);
   return CMD_FAILURE;
 }