summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-09-21 21:13:33 -0700
committerMatt Turner <[email protected]>2014-12-08 17:02:19 -0800
commit9019e5e19532fe214fc6e45b9ee1f60bbe332456 (patch)
treec382866b78653aea157f085c9cdb8bd3695798e8 /src/gallium/auxiliary/util
parentcae7a2a0319e31eef0975edafc730efd3bd2c8d4 (diff)
Remove useless checks for NULL before freeing
See commits 5067506e and b6109de3 for the Coccinelle script. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_debug_flush.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c
index fdb248c23af..cdefca2fb11 100644
--- a/src/gallium/auxiliary/util/u_debug_flush.c
+++ b/src/gallium/auxiliary/util/u_debug_flush.c
@@ -132,8 +132,7 @@ debug_flush_buf_reference(struct debug_flush_buf **dst,
struct debug_flush_buf *fbuf = *dst;
if (pipe_reference(&(*dst)->reference, &src->reference)) {
- if (fbuf->map_frame)
- FREE(fbuf->map_frame);
+ FREE(fbuf->map_frame);
FREE(fbuf);
}
@@ -146,8 +145,7 @@ debug_flush_item_destroy(struct debug_flush_item *item)
{
debug_flush_buf_reference(&item->fbuf, NULL);
- if (item->ref_frame)
- FREE(item->ref_frame);
+ FREE(item->ref_frame);
FREE(item);
}
@@ -263,10 +261,8 @@ debug_flush_unmap(struct debug_flush_buf *fbuf)
fbuf->mapped_sync = FALSE;
fbuf->mapped = FALSE;
- if (fbuf->map_frame) {
- FREE(fbuf->map_frame);
- fbuf->map_frame = NULL;
- }
+ FREE(fbuf->map_frame);
+ fbuf->map_frame = NULL;
pipe_mutex_unlock(fbuf->mutex);
}