From 5fe116e913192d092d3d73872484a2136217d6f1 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Thu, 29 Aug 2013 15:15:56 +0200 Subject: [PATCH] tests/gem_evict_*: Fix leak in copy This turned out to be the reason one one of my tests was hitting the list corruption bug - we need a good deal more memory pressure. So I'll now add a new testcase for that. Signed-off-by: Daniel Vetter --- tests/gem_evict_alignment.c | 1 + tests/gem_evict_everything.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/gem_evict_alignment.c b/tests/gem_evict_alignment.c index a70d3fa2..83ce5be7 100644 --- a/tests/gem_evict_alignment.c +++ b/tests/gem_evict_alignment.c @@ -117,6 +117,7 @@ copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo, int alignme igt_assert(ret == error); gem_close(fd, handle); + free(obj); } static void minor_evictions(int fd, int size, int count) diff --git a/tests/gem_evict_everything.c b/tests/gem_evict_everything.c index d95a54e9..bf93e70d 100644 --- a/tests/gem_evict_everything.c +++ b/tests/gem_evict_everything.c @@ -115,6 +115,7 @@ copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo, int error) igt_assert(ret == error); gem_close(fd, handle); + free(obj); } static void minor_evictions(int fd, int size, int count)