summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/expr.c')
-rw-r--r--tools/perf/tests/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c
index 9acc1e80b936..ee1d88650e69 100644
--- a/tools/perf/tests/expr.c
+++ b/tools/perf/tests/expr.c
@@ -3,6 +3,7 @@
#include "util/expr.h"
#include "tests.h"
#include <stdlib.h>
+#include <linux/zalloc.h>
static int test(struct parse_ctx *ctx, const char *e, double val2)
{
@@ -58,7 +59,7 @@ int test__expr(struct test *t __maybe_unused, int subtest __maybe_unused)
TEST_ASSERT_VAL("find other", other[3] == NULL);
for (i = 0; i < num_other; i++)
- free((void *)other[i]);
+ zfree(&other[i]);
free((void *)other);
return 0;