gallium/cso: avoid unnecessary null dereference
The label `out:` calls `destroy()` which dereferences `ctx`. This is unnecessary as there is nothing to destroy. Immediately return instead. CovID: 1258255 Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
2f86582b92
commit
9411eb67ec
|
@ -251,7 +251,7 @@ struct cso_context *cso_create_context( struct pipe_context *pipe )
|
|||
{
|
||||
struct cso_context *ctx = CALLOC_STRUCT(cso_context);
|
||||
if (!ctx)
|
||||
goto out;
|
||||
return NULL;
|
||||
|
||||
ctx->cache = cso_cache_create();
|
||||
if (ctx->cache == NULL)
|
||||
|
|
Loading…
Reference in New Issue