Re: [PATCH 2/6] perf cs-etm: Free partially created queues

From: Leo Yan

Date: Fri Sep 04 2026 - 13:43:54 EST


On Fri, Aug 21, 2026 at 10:50:30AM +0100, James Clark wrote:
> cs_etm__create_decoders() can fail half way through and the
> err_free_queues label won't free them. Call the full queue free function
> here instead. If no decoders were created it's a nop.

[...]

> @@ -3520,6 +3527,7 @@ static int cs_etm__create_queue_decoders(struct cs_etm_queue *etmq)
>
> out_free_decoder:
> cs_etm_decoder__free(etmq->decoder);
> + etmq->decoder = NULL;

cs_etm__free_queue() also calls cs_etm_decoder__free() but does not
clear etmq->decoder. Should we do the same there, or drop this
unrelated change?

Otherwise, for the queues free fix:

Reviewed-by: Leo Yan <leo.yan@xxxxxxx>