Commit acc7bfb3 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf metricgroup: Add missing list_del_init() when flushing egroups list

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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e56fbc9d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
	}
}