Merge v5.14-rc3 into usb-next
[linux-2.6-microblaze.git] / tools / perf / tests / bpf.c
index c72adbd..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>
@@ -151,7 +152,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
        }
 
        evlist__splice_list_tail(evlist, &parse_state.list);
-       evlist->nr_groups = parse_state.nr_groups;
+       evlist->core.nr_groups = parse_state.nr_groups;
 
        evlist__config(evlist, &opts, NULL);
 
@@ -276,6 +277,7 @@ static int __test__bpf(int idx)
        }
 
 out:
+       free(obj_buf);
        bpf__clear();
        return ret;
 }