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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c
index 9acc1e80b936..87843af4c118 100644
--- a/tools/perf/tests/expr.c
+++ b/tools/perf/tests/expr.c
@@ -3,6 +3,8 @@
#include "util/expr.h"
#include "tests.h"
#include <stdlib.h>
+#include <string.h>
+#include <linux/zalloc.h>
static int test(struct parse_ctx *ctx, const char *e, double val2)
{
@@ -58,7 +60,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;
OpenPOWER on IntegriCloud