etnaviv: move pctx initialisation to avoid a null dereference
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Wed, 8 Feb 2017 12:07:25 +0000 (13:07 +0100)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Tue, 21 Feb 2017 20:14:27 +0000 (21:14 +0100)
commita0b16a08905d68da07668a42eeb464b4f30bf3e5
tree4108148247183a62c45c3a9ea52c37395b78107b
parentf709096d0e34c3f6c9b3e45683b301b9d97a0d1a
etnaviv: move pctx initialisation to avoid a null dereference

In case ctx->stream == NULL the fail label gets executed where
pctx gets dereferenced - too bad pctx is NULL in that case.

Caught by Coverity, reported to me by imirkin.

Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/gallium/drivers/etnaviv/etnaviv_context.c