perf metricgroup: Add missing list_del_init() when flushing egroups list
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 4 Jul 2019 15:20:21 +0000 (12:20 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 9 Jul 2019 13:13:27 +0000 (10:13 -0300)
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

index 0d8c840..416a901 100644 (file)
@@ -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);
        }
 }