tests/gem_evict_*: Fix leak in copy
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 29 Aug 2013 13:15:56 +0000 (15:15 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 29 Aug 2013 16:18:33 +0000 (18:18 +0200)
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 <daniel.vetter@ffwll.ch>
tests/gem_evict_alignment.c
tests/gem_evict_everything.c

index a70d3fa..83ce5be 100644 (file)
@@ -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)
index d95a54e..bf93e70 100644 (file)
@@ -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)