From: Grazvydas Ignotas Date: Mon, 22 Jan 2018 22:41:00 +0000 (-0700) Subject: svga: fix context alloc error handling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=08085df3132fc7283b2a181221d748e6e4607812;p=mesa.git svga: fix context alloc error handling 'cleanup' path is dereferencing 'svga' a lot, 'done' is a better choice. Found by Coccinelle. Signed-off-by: Grazvydas Ignotas Reviewed-by: Eric Engestrom Reviewed-by: Brian Paul --- diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c index af16a99b72c..7b3e9e81f4c 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -134,7 +134,7 @@ svga_context_create(struct pipe_screen *screen, void *priv, unsigned flags) svga = CALLOC_STRUCT(svga_context); if (!svga) - goto cleanup; + goto done; LIST_INITHEAD(&svga->dirty_buffers);