igt/gem_exec_big: Don't try to repeatedly munmap(NULL)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-01-14 14:33:29 +00:00
parent 3214a27b5b
commit 3ea7a28072

View File

@ -193,7 +193,8 @@ igt_simple_main
execN(fd, handle, batch_size, 0, ptr); execN(fd, handle, batch_size, 0, ptr);
execN(fd, handle, batch_size, I915_EXEC_SECURE, 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); gem_madvise(fd, handle, I915_MADV_DONTNEED);
if (batch_size < max && 2*batch_size > max) if (batch_size < max && 2*batch_size > max)