aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-06-27 14:52:54 +0800
committerChia-I Wu <[email protected]>2013-06-28 10:11:49 +0800
commite071812e46617b6f1d335aef6381de7b6afc269f (patch)
treecb81cb4e4e46dc03afecc662433f934842402090 /src/gallium/drivers/ilo
parentc74a7eb9c53fda10d77bec09801c0b619b29deea (diff)
ilo: avoid potential dangling pointer dereference
Set pipe_draw_info to NULL after draw_vbo().
Diffstat (limited to 'src/gallium/drivers/ilo')
-rw-r--r--src/gallium/drivers/ilo/ilo_3d.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d.c b/src/gallium/drivers/ilo/ilo_3d.c
index ef3aeced340..65adcf26f7e 100644
--- a/src/gallium/drivers/ilo/ilo_3d.c
+++ b/src/gallium/drivers/ilo/ilo_3d.c
@@ -729,6 +729,9 @@ ilo_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
ilo->dirty = 0x0;
hw3d->new_batch = false;
+ /* avoid dangling pointer reference */
+ ilo->draw = NULL;
+
update_prim_count(hw3d, prim_generated, prim_emitted);
if (ilo_debug & ILO_DEBUG_NOCACHE)