From: Eric Anholt Date: Mon, 4 Aug 2014 20:00:56 +0000 (-0700) Subject: vc4: Don't forget to unmap the GEM BO when freeing. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cdc208bdaf90017c2e1aaa54d2318b956e801ca0;p=mesa.git vc4: Don't forget to unmap the GEM BO when freeing. Otherwise it'll stick around forever. --- diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c index 653787e1905..581ba89fd07 100644 --- a/src/gallium/drivers/vc4/vc4_bufmgr.c +++ b/src/gallium/drivers/vc4/vc4_bufmgr.c @@ -75,6 +75,9 @@ vc4_bo_free(struct vc4_bo *bo) #ifndef USE_VC4_SIMULATOR struct vc4_screen *screen = bo->screen; + if (bo->map) + munmap(bo->map, bo->size); + struct drm_gem_close c; c.handle = bo->handle; int ret = drmIoctl(screen->fd, DRM_IOCTL_GEM_CLOSE, &c);