Re: [PATCH] perf parse-events: Fix potential null pointer dereference in __add_event()

From: Markus Elfring
Date: Tue Aug 12 2025 - 05:27:50 EST



> Add a null check before accessing evsel members in the error path.

* Please extend the goto chain instead for better exception handling.
You may reorder jump targets accordingly.

* How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?

* Would a summary phrase like “Prevent null pointer dereference in __add_event()”
be nicer?


Regards,
Markus