diff options
Diffstat (limited to 'intel')
-rw-r--r-- | intel/intel_bufmgr_gem.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 35b42cf4..ba655274 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -3403,9 +3403,8 @@ retry: close_bo.handle = userptr.handle; ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_GEM_CLOSE, &close_bo); - if (ret == 0) { - free(ptr); - } else { + free(ptr); + if (ret) { fprintf(stderr, "Failed to release test userptr object! (%d) " "i915 kernel driver may not be sane!\n", errno); return false; |