diff mbox

intel: Use VG_CLEAR on the context destroy ioctl as well.

Message ID 1344803873-2526-1-git-send-email-kenneth@whitecape.org (mailing list archive)
State New, archived
Headers show

Commit Message

Kenneth Graunke Aug. 12, 2012, 8:37 p.m. UTC
Otherwise pad appears uninitialized and valgrind grumbles.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
---
 intel/intel_bufmgr_gem.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Eric Anholt Aug. 13, 2012, 1:55 a.m. UTC | #1
Kenneth Graunke <kenneth@whitecape.org> writes:

Reviewed-by: Eric Anholt <eric@anholt.net>
diff mbox

Patch

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index a170813..795c1a8 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2936,6 +2936,8 @@  drm_intel_gem_context_destroy(drm_intel_context *ctx)
 	if (ctx == NULL)
 		return;
 
+	VG_CLEAR(destroy);
+
 	bufmgr_gem = (drm_intel_bufmgr_gem *)ctx->bufmgr;
 	destroy.ctx_id = ctx->ctx_id;
 	ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_CONTEXT_DESTROY,