diff mbox

[v2,libdrm,7/7] libdrm: valgrind-clear a few more IOCTL arguments

Message ID 1397043630-13972-8-git-send-email-thierry.reding@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thierry Reding April 9, 2014, 11:40 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

Fixes a few complaints raised by valgrind when running the Tegra tests.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 xf86drmMode.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/xf86drmMode.c b/xf86drmMode.c
index a6bb2ee44576..861248b7c2fc 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -282,6 +282,7 @@  int drmModeAddFB2(int fd, uint32_t width, uint32_t height,
 	struct drm_mode_fb_cmd2 f;
 	int ret;
 
+	VG_CLEAR(f);
 	f.width  = width;
 	f.height = height;
 	f.pixel_format = pixel_format;
@@ -309,6 +310,7 @@  drmModeFBPtr drmModeGetFB(int fd, uint32_t buf)
 	struct drm_mode_fb_cmd info;
 	drmModeFBPtr r;
 
+	VG_CLEAR(info);
 	info.fb_id = buf;
 
 	if (drmIoctl(fd, DRM_IOCTL_MODE_GETFB, &info))