lkml.org 
[lkml]   [2019]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 16/25] perf metricgroup: Add missing list_del_init() when flushing egroups list
    Date
    From: Arnaldo Carvalho de Melo <acme@redhat.com>

    So that at the end each of the entries have its list node struct cleared
    and the egroup list head ends emptied.

    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Link: https://lkml.kernel.org/n/tip-dxzj1ah350fy9ec0xbhb15b6@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ---
    tools/perf/util/metricgroup.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
    index 0d8c840f88c0..416a9015405e 100644
    --- a/tools/perf/util/metricgroup.c
    +++ b/tools/perf/util/metricgroup.c
    @@ -492,6 +492,7 @@ static void metricgroup__free_egroups(struct list_head *group_list)
    for (i = 0; i < eg->idnum; i++)
    zfree(&eg->ids[i]);
    zfree(&eg->ids);
    + list_del_init(&eg->nd);
    free(eg);
    }
    }
    --
    2.21.0
    \
     
     \ /
      Last update: 2019-07-09 20:45    [W:3.901 / U:1.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site