zink: Check fopen result.
authorVinson Lee <vlee@freedesktop.org>
Wed, 27 May 2020 23:19:25 +0000 (16:19 -0700)
committerMichel Dänzer <michel@daenzer.net>
Fri, 29 May 2020 08:59:19 +0000 (08:59 +0000)
commita2ee293422c09c9ecc8150ad70d29273e28c6a71
tree0bd8921304116c3b68a4c19d9d109c43b6057b19
parent7503863fe2a48d155ec9c1778206f1e9a2dc5987
zink: Check fopen result.

Fix warning reported by Coverity.

Dereference null return value (NULL_RETURNS)
dereference: Dereferencing a pointer that might be NULL fp when calling
fwrite.

Fixes: 8d46e35d16e3 ("zink: introduce opengl over vulkan")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5235>
src/gallium/drivers/zink/zink_compiler.c