Commit 937654ce authored by Riccardo Mancini's avatar Riccardo Mancini Committed by Arnaldo Carvalho de Melo
Browse files

perf test bpf: Free obj_buf

ASan reports some memory leaks when running:

  # perf test "42: BPF filter"

The first of these leaks is caused by obj_buf never being deallocated in

This patch adds the missing free.
Signed-off-by: default avatarRiccardo Mancini <>
Fixes: ba1fae43 ("perf test: Add 'perf test BPF'")
Cc: Ian Rogers <>
Cc: Jiri Olsa <>
Cc: Mark Rutland <>
Cc: Namhyung Kim <>
Cc: Peter Zijlstra <>
Cc: Wang Nan <>

[ Added missing stdlib.h include ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <>
parent 659ede7d
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/epoll.h>
#include <sys/types.h>
#include <sys/stat.h>
......@@ -276,6 +277,7 @@ static int __test__bpf(int idx)
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment