Fix read from pointer after free
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 4 Jan 2012 02:12:06 +0000 (18:12 -0800)
committerAnuj Phogat <anuj.phogat@gmail.com>
Wed, 4 Jan 2012 03:04:03 +0000 (19:04 -0800)
commit0ed11e333147e280208d9d0b3ff3f39970547643
treeeb47c82b7dc3056e9519916a6aded866e1101bd7
parent2f1ab63fab592264c13e7dbab39a5cea1a622903
Fix read from pointer after free

Coverity reported a read from pointer after free defect in
src/mesa/drivers/dri/intel/intel_mipmap_tree.c. Bug# 44205
In intel_miptree_all_slices_resolve() function, i = i->next was
executing after freeing i. I have defined a temporary variable
(next) to store the value of i->next before freeing i

Reported-by: Vinson Lee <vlee@vmware.com>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/intel/intel_mipmap_tree.c