[PATCH 2/6] perf cs-etm: Free partially created queues
James Clark
james.clark at linaro.org
Thu Oct 1 03:40:00 PDT 2026
On 04/09/2026 18:12, Leo Yan wrote:
> 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?
Yep we should do the same, I'll make cs_etm_decoder__free() call zfree()
and drop the explicit NULL.
>
> Otherwise, for the queues free fix:
>
> Reviewed-by: Leo Yan <leo.yan at arm.com>
More information about the linux-arm-kernel
mailing list