mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 09:31:26 +00:00
perf report: Prevent segfault with --no-parent
Prevent a perf report segfault with the (non sensical) --no-parent option Signed-off-By: Andi Kleen <ak@linux.intel.com> Acked-by: Namhyung <namhyung@kernel.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20240130185552.150578-1-ak@linux.intel.com
This commit is contained in:
parent
4962aec0d6
commit
1c84b47f99
@ -3372,7 +3372,7 @@ int sort_dimension__add(struct perf_hpp_list *list, const char *tok,
|
||||
sort_dimension_add_dynamic_header(sd);
|
||||
}
|
||||
|
||||
if (sd->entry == &sort_parent) {
|
||||
if (sd->entry == &sort_parent && parent_pattern) {
|
||||
int ret = regcomp(&parent_regex, parent_pattern, REG_EXTENDED);
|
||||
if (ret) {
|
||||
char err[BUFSIZ];
|
||||
|
Loading…
Reference in New Issue
Block a user