summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/mmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c
index ab30555d2afc..8fc39311a30d 100644
--- a/tools/perf/util/mmap.c
+++ b/tools/perf/util/mmap.c
@@ -207,8 +207,14 @@ static int perf_mmap__aio_mmap(struct perf_mmap *map, struct mmap_params *mp)
static void perf_mmap__aio_munmap(struct perf_mmap *map)
{
+ int i;
+
+ for (i = 0; i < map->aio.nr_cblocks; ++i)
+ zfree(&map->aio.data[i]);
if (map->aio.data)
zfree(&map->aio.data);
+ zfree(&map->aio.cblocks);
+ zfree(&map->aio.aiocb);
}
int perf_mmap__aio_push(struct perf_mmap *md, void *to, int idx,