Re: [PATCH v1 01/12] perf expr: Add has_event function

From: John Garry
Date: Fri Jun 23 2023 - 10:40:56 EST


On 23/06/2023 01:33, Ian Rogers wrote:
+ if (!compute_ids)
+ return 0.0;
+
+ tmp = evlist__new();

tmp may be NULL, and parse_event() is not NULL safe, so I assume that we need to handle tmp == NULL

+ ret = parse_event(tmp, id) ? 0 : 1;
+ evlist__delete(tmp);
+ return ret;