From 3a6763f0a078b2abc9a2b0dd43efc6efe73eee30 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Wed, 4 May 2016 06:15:36 +0200 Subject: [PATCH] freedreno: remove null check before free Reviewed-by: Eduardo Lima Mitev --- src/gallium/drivers/freedreno/freedreno_resource.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 99affc492d1..44558185a6b 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -262,8 +262,7 @@ fd_resource_transfer_unmap(struct pipe_context *pctx, pipe_resource_reference(&ptrans->resource, NULL); util_slab_free(&ctx->transfer_pool, ptrans); - if (trans->staging) - free(trans->staging); + free(trans->staging); } static void * -- 2.30.2