[Mesa-dev] [PATCH 2/3] freedreno: remove null check before free

Thomas Hindoe Paaboel Andersen phomes at gmail.com
Wed May 4 04:15:36 UTC 2016


---
 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 99affc4..4455818 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.7.4



More information about the mesa-dev mailing list