[Mesa-dev] [PATCH 1/2] svga: fix context alloc error handling
Emil Velikov
emil.l.velikov at gmail.com
Thu Jan 25 11:27:47 UTC 2018
On 23 January 2018 at 18:02, Brian Paul <brianp at vmware.com> wrote:
> On 01/22/2018 03:41 PM, Grazvydas Ignotas wrote:
>>
>> 'cleanup' path is dereferencing 'svga' a lot, 'done' is a better choice.
>> Found by Coccinelle.
>>
>> Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
>> ---
>> src/gallium/drivers/svga/svga_context.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/drivers/svga/svga_context.c
>> b/src/gallium/drivers/svga/svga_context.c
>> index af16a99..7b3e9e8 100644
>> --- a/src/gallium/drivers/svga/svga_context.c
>> +++ b/src/gallium/drivers/svga/svga_context.c
>> @@ -132,11 +132,11 @@ svga_context_create(struct pipe_screen *screen, void
>> *priv, unsigned flags)
>> SVGA_STATS_TIME_PUSH(svgascreen->sws,
>> SVGA_STATS_TIME_CREATECONTEXT);
>> svga = CALLOC_STRUCT(svga_context);
>> if (!svga)
>> - goto cleanup;
>> + goto done;
>> LIST_INITHEAD(&svga->dirty_buffers);
>> svga->pipe.screen = screen;
>> svga->pipe.priv = priv;
>>
>
> For both, Reviewed-by: Brian Paul <brianp at vmware.com>
>
> I'll push them. Thanks!
>
Feel free to add the stable tag as you do.
Cc: mesa-stable at lists.freedesktop.org
-Emil
More information about the mesa-dev
mailing list