OSDN Git Service

intel: Use VG_CLEAR on the context destroy ioctl as well.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 12 Aug 2012 20:33:05 +0000 (13:33 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 13 Aug 2012 03:13:50 +0000 (20:13 -0700)
Otherwise pad appears uninitialized and valgrind grumbles.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
intel/intel_bufmgr_gem.c

index 0ea6260..7953137 100644 (file)
@@ -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,