diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-01-14 14:33:29 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-01-14 14:34:16 +0000 |
commit | 3ea7a2807214900edfdfc171968d7c2e22890c0b (patch) | |
tree | 6fa699dcdba21a982274f9ea8e8deeb4b01dd888 /tests/gem_exec_big.c | |
parent | 3214a27b5ba7cd621b091f1d0702e069a750c054 (diff) |
igt/gem_exec_big: Don't try to repeatedly munmap(NULL)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_exec_big.c')
-rw-r--r-- | tests/gem_exec_big.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/gem_exec_big.c b/tests/gem_exec_big.c index eb5ad0d10..15337e66e 100644 --- a/tests/gem_exec_big.c +++ b/tests/gem_exec_big.c @@ -193,7 +193,8 @@ igt_simple_main execN(fd, handle, batch_size, 0, ptr); execN(fd, handle, batch_size, I915_EXEC_SECURE, ptr); - munmap(ptr, batch_size); + if (ptr) + munmap(ptr, batch_size); gem_madvise(fd, handle, I915_MADV_DONTNEED); if (batch_size < max && 2*batch_size > max) |