Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44f1453b authored by Manohar Vavilapalli's avatar Manohar Vavilapalli
Browse files

coresight: perf: Add NULL check before using pointer sink



Add NULL check to avoid potential NULL pointer dereference.

Change-Id: I6e63a013f599393f9703cd9a493730181f4a68de
Signed-off-by: default avatarManohar Vavilapalli <mvavilap@codeaurora.org>
parent 19dad3f7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -145,6 +145,9 @@ static void free_sink_buffer(struct etm_event_data *event_data)

	cpu = cpumask_first(mask);
	sink = coresight_get_sink(etm_event_cpu_path(event_data, cpu));
	if (!sink)
		return;

	sink_ops(sink)->free_buffer(event_data->snk_config);
}