perf test bpf: Free obj_buf
[linux-2.6-microblaze.git] / tools / perf / tests / bpf.c
index 33bda9c..dbf5f52 100644 (file)
@@ -1,6 +1,7 @@
 // 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)
        }
 
 out:
+       free(obj_buf);
        bpf__clear();
        return ret;
 }