From ae01280a3bb10f74a1973da9db8d76f48363213b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 1 Aug 2022 17:25:49 -0700 Subject: [PATCH] FREQUENCIES: Fix use-after-free error. --- src/language/stats/frequencies.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/language/stats/frequencies.c b/src/language/stats/frequencies.c index 307a869ba2..a851c21960 100644 --- a/src/language/stats/frequencies.c +++ b/src/language/stats/frequencies.c @@ -1244,9 +1244,9 @@ cmd_frequencies (struct lexer *lexer, struct dataset *ds) error: free (vars); - free (frq.vars); for (size_t i = 0; i < frq.n_vars; i++) free (frq.vars[i].percentiles); + free (frq.vars); free (frq.bar); free (frq.pie); free (frq.hist); -- 2.30.2