|
@@ -1567,6 +1567,13 @@ static int hists_evsel__init(struct perf_evsel *evsel)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static void hists_evsel__exit(struct perf_evsel *evsel)
|
|
|
+{
|
|
|
+ struct hists *hists = evsel__hists(evsel);
|
|
|
+
|
|
|
+ hists__delete_entries(hists);
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* XXX We probably need a hists_evsel__exit() to free the hist_entries
|
|
|
* stored in the rbtree...
|
|
@@ -1575,7 +1582,8 @@ static int hists_evsel__init(struct perf_evsel *evsel)
|
|
|
int hists__init(void)
|
|
|
{
|
|
|
int err = perf_evsel__object_config(sizeof(struct hists_evsel),
|
|
|
- hists_evsel__init, NULL);
|
|
|
+ hists_evsel__init,
|
|
|
+ hists_evsel__exit);
|
|
|
if (err)
|
|
|
fputs("FATAL ERROR: Couldn't setup hists class\n", stderr);
|
|
|
|