diff options
-rw-r--r-- | xf86drm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2721,6 +2721,8 @@ int drmPrimeHandleToFD(int fd, uint32_t handle, uint32_t flags, int *prime_fd) struct drm_prime_handle args; int ret; + memclear(args); + args.fd = -1; args.handle = handle; args.flags = flags; ret = drmIoctl(fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args); @@ -2736,8 +2738,8 @@ int drmPrimeFDToHandle(int fd, int prime_fd, uint32_t *handle) struct drm_prime_handle args; int ret; + memclear(args); args.fd = prime_fd; - args.flags = 0; ret = drmIoctl(fd, DRM_IOCTL_PRIME_FD_TO_HANDLE, &args); if (ret) return ret; |