Re: [PATCH 08/11] perf metric: Free metric when it failed to resolve

2020-09-15 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 15, 2020 at 12:18:16PM +0900, Namhyung Kim escreveu: > The metricgroup__add_metric() can find multiple match for a metric > group and it's possible to fail. Also it can fail in the middle like > in resolve_metric() even for single metric. Thanks, applied. - Arnaldo > > In those cas

[PATCH 08/11] perf metric: Free metric when it failed to resolve

2020-09-14 Thread Namhyung Kim
The metricgroup__add_metric() can find multiple match for a metric group and it's possible to fail. Also it can fail in the middle like in resolve_metric() even for single metric. In those cases, the intermediate list and ids will be leaked like: Direct leak of 3 byte(s) in 1 object(s) allocat