From 75c31b24e93c5bcdee66a46e12529f4c85bb18d7 Mon Sep 17 00:00:00 2001 From: Andrii Nakryiko Date: Tue, 4 Jun 2024 11:47:53 -0700 Subject: [PATCH] veristat: sync to latest upstream veristat Sync a simple fix from upstream veristat version. Signed-off-by: Andrii Nakryiko --- src/veristat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/veristat.c b/src/veristat.c index 244d499..b285423 100644 --- a/src/veristat.c +++ b/src/veristat.c @@ -792,10 +792,13 @@ static int parse_stats(const char *stats_str, struct stat_specs *specs) while ((next = strtok_r(state ? NULL : input, ",", &state))) { err = parse_stat(next, specs); - if (err) + if (err) { + free(input); return err; + } } + free(input); return 0; }