From cf0fc0261ad9ef54c275fb9d6214949fc073751f Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 27 Apr 2015 15:48:23 +0200 Subject: [PATCH] drmPrimeHandleToFD: initialize args.fd to 0 Fix a Valgrind error becuause this memory was uninitialized. https://bugs.freedesktop.org/show_bug.cgi?id=90194 Signed-off-by: Guillaume Desmottes --- xf86drm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xf86drm.c b/xf86drm.c index ffc53b8..a3a8b4c 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -2724,6 +2724,7 @@ int drmPrimeHandleToFD(int fd, uint32_t handle, uint32_t flags, int *prime_fd) struct drm_prime_handle args; int ret; + args.fd = 0; args.handle = handle; args.flags = flags; ret = drmIoctl(fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args); -- 2.1.0