Skip to content

Commit 073a15c

Browse files
liwg06acmel
authored andcommitted
perf bench: Fix NULL check against wrong variable
We did a NULL check after "epollfdp = calloc(...)", but we checked "epollfd" instead of "epollfdp". Signed-off-by: Weiguo Li <[email protected]> Acked-by: Davidlohr Bueso <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent a7a7263 commit 073a15c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/bench/epoll-ctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static void nest_epollfd(void)
106106
printinfo("Nesting level(s): %d\n", nested);
107107

108108
epollfdp = calloc(nested, sizeof(int));
109-
if (!epollfd)
109+
if (!epollfdp)
110110
err(EXIT_FAILURE, "calloc");
111111

112112
for (i = 0; i < nested; i++) {

0 commit comments

Comments
 (0)