freedreno: remove null check before free
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 4 May 2016 04:15:36 +0000 (06:15 +0200)
committerEduardo Lima Mitev <elima@igalia.com>
Thu, 5 May 2016 07:34:01 +0000 (09:34 +0200)
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
src/gallium/drivers/freedreno/freedreno_resource.c

index 99affc492d1a8ac077d2dfd97d67ea7ccc5bfc8d..44558185a6b0a8cc259e874bcf26cff3519dbb8c 100644 (file)
@@ -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 *