i915: Fix wrong sizeof argument in i915_update_tex_unit.
authorVinson Lee <vlee@freedesktop.org>
Wed, 14 Nov 2012 07:20:42 +0000 (23:20 -0800)
committerVinson Lee <vlee@freedesktop.org>
Wed, 21 Nov 2012 23:02:35 +0000 (15:02 -0800)
The bug was found by Coverity.

NOTE: This is a candidate for the stable branches.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i915/i915_texstate.c

index 4bd5e72cf678401089976d1055945e1c38734d37..94a8e5522ecfa890fe6009109d28ecee311c46bd 100644 (file)
@@ -146,7 +146,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
    GLubyte border[4];
    GLfloat maxlod;
 
-   memset(state, 0, sizeof(state));
+   memset(state, 0, sizeof(*state));
 
    /*We need to refcount these. */