From: Ben Pfaff Date: Tue, 2 Aug 2022 00:25:49 +0000 (-0700) Subject: FREQUENCIES: Fix use-after-free error. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=a8104edb824e61d70ed2b7314be80e860a5f2002;p=pspp FREQUENCIES: Fix use-after-free error. --- 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);