lkml.org 
[lkml]   [2021]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 19/20] perf test: bpf: free obj_buf
Date
ASan reports some memory leaks when running the perf test
"42: BPF filter".
The first of these leaks is caused by obj_buf never being deallocated in
__test__bpf.

This patch adds the missing free.

Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
---
tools/perf/tests/bpf.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c
index 33bda9c265423547..2cda4a6297e07967 100644
--- a/tools/perf/tests/bpf.c
+++ b/tools/perf/tests/bpf.c
@@ -276,6 +276,7 @@ static int __test__bpf(int idx)
}

out:
+ free(obj_buf);
bpf__clear();
return ret;
}
--
2.31.1
\
 
 \ /
  Last update: 2021-07-15 18:09    [W:0.180 / U:2.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site