From 8772d95d40367a2e27aef2127213a99540625632 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 27 Nov 2019 17:22:24 +0100 Subject: [PATCH] zink: do not try to destroy NULL-fence destroy_fence doesn't handle NULL-pointers gracefully. So let's avoid hitting that code-path, by simply returning NULL early here instead. CoverityID: 1455179 Reviewed-by: Dave Airlie --- src/gallium/drivers/zink/zink_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_fence.c b/src/gallium/drivers/zink/zink_fence.c index ac761e667a3..72f1b6c5766 100644 --- a/src/gallium/drivers/zink/zink_fence.c +++ b/src/gallium/drivers/zink/zink_fence.c @@ -46,7 +46,7 @@ zink_create_fence(struct pipe_screen *pscreen) struct zink_fence *ret = CALLOC_STRUCT(zink_fence); if (!ret) { debug_printf("CALLOC_STRUCT failed\n"); - goto fail; + return NULL; } if (vkCreateFence(screen->dev, &fci, NULL, &ret->fence) != VK_SUCCESS) { -- 2.30.2