diff options
Diffstat (limited to 'tools/perf/builtin-kvm.c')
-rw-r--r-- | tools/perf/builtin-kvm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 4c205df5106f..1e1cb5a9d0a2 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -768,7 +768,6 @@ static void kvm_he_free(void *he) { struct kvm_event *kvm_ev; - free(((struct hist_entry *)he)->kvm_info); kvm_ev = container_of(he, struct kvm_event, he); free(kvm_ev); } @@ -788,7 +787,7 @@ static struct kvm_event *find_create_kvm_event(struct perf_kvm_stat *kvm, BUG_ON(key->key == INVALID_KEY); - ki = zalloc(sizeof(*ki)); + ki = kvm_info__new(); if (!ki) { pr_err("Failed to allocate kvm info\n"); return NULL; |