Skip to content
Commit c481f930 authored by Namhyung Kim's avatar Namhyung Kim Committed by Jiri Olsa
Browse files

perf ui/tui: Fix off-by-one in hist_browser__update_nr_entries()



The nr_entries variable is increased inside the loop in the function
but it always count the first entry regardless of it's filtered or
not; caused an off-by-one error.

It'd become a problem especially there's no entry at all - it'd get a
segfault during referencing a NULL pointer.

Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1398327843-31845-9-git-send-email-namhyung@kernel.org


Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
parent 3186b681
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment