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)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Sun, 20 Jan 2013 14:08:28 +0000 (15:08 +0100)
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>
(cherry picked from commit 10f214e5b248e5dd5f323c689549cd66d2f6ad22)

src/mesa/drivers/dri/i915/i915_texstate.c

index 4bd5e72..94a8e55 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. */