Mesa (master): vc4: Clear padding of ioctl arguments.

Eric Anholt anholt at kemper.freedesktop.org
Sat Aug 23 23:31:10 UTC 2014


Module: Mesa
Branch: master
Commit: 9542e682078a1b2e65f6b62a8db58f25cff18078
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9542e682078a1b2e65f6b62a8db58f25cff18078

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Aug 22 16:36:29 2014 -0700

vc4: Clear padding of ioctl arguments.

Fixes valgrind complaints from valgrind being unaware of our ioctls.

---

 src/gallium/drivers/vc4/vc4_bufmgr.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c
index 6d622c0..7664d86 100644
--- a/src/gallium/drivers/vc4/vc4_bufmgr.c
+++ b/src/gallium/drivers/vc4/vc4_bufmgr.c
@@ -77,6 +77,7 @@ vc4_bo_free(struct vc4_bo *bo)
         }
 
         struct drm_gem_close c;
+        memset(&c, 0, sizeof(c));
         c.handle = bo->handle;
         int ret = drmIoctl(screen->fd, DRM_IOCTL_GEM_CLOSE, &c);
         if (ret != 0)




More information about the mesa-commit mailing list