i965: miptree: prevent potential NULL pointer access
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 9 Nov 2016 16:33:51 +0000 (16:33 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 16 Nov 2016 08:56:08 +0000 (08:56 +0000)
commit25a8e8bbd5e98abfd263bfc44f010b40747c04cc
treee76c687bd1813635ce451a277dfecb6e2923f2a7
parent615ccf44cf0305976b15bad48252943802e41345
i965: miptree: prevent potential NULL pointer access

If the mcs buffer allocation fails we might get a NULL pointer. This
was reported by Coverity and should only happen if we run out of
memory.

v2: return failure at the point of allocation (Chris)

CID: 1394290
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c