etnaviv: don't dereference etna_resource pointer if allocation fails
authorAleksander Morgado <aleksander@aleksander.es>
Thu, 6 Jul 2017 09:35:37 +0000 (11:35 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Thu, 6 Jul 2017 19:06:25 +0000 (21:06 +0200)
commita6893a50c8ae5b68e4175366dac718ee9f6fa9d1
treedfe893a0f2476a5053b83e7276e86e8c8518d081
parentc5d0dc7fa5566941a49ede8c83a0cfe0a33a3d7f
etnaviv: don't dereference etna_resource pointer if allocation fails

The check for the pointer being non-NULL was being done too late.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_resource.c