EXAMINE: Fix leak in Shapiro-Wilk test.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 21 Jul 2019 02:58:56 +0000 (19:58 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 21 Jul 2019 04:18:03 +0000 (21:18 -0700)
CC: John Darrington <john@darrington.wattle.id.au>
Fixes: 0b7e8882ce9b ("EXAMINE: Implement the Shapiro-Wilk Test.")
src/language/stats/examine.c

index 794fefe6c1cf1571f20be80ecc857af3c98e971b..a9deed66b91b5729bc53f1c042342b530f3be985 100644 (file)
@@ -1320,6 +1320,12 @@ cleanup_exploratory_stats (struct examine *cmd)
                  stat->destroy (stat);
                }
 
+              if (es[v].shapiro_wilk)
+                {
+                  stat = &es[v].shapiro_wilk->parent.parent;
+                  stat->destroy (stat);
+                }
+
              os = &es[v].trimmed_mean->parent;
              stat = &os->parent;
              stat->destroy (stat);