diff options
author | Matt Turner <[email protected]> | 2014-09-21 21:13:33 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-12-08 17:02:19 -0800 |
commit | 9019e5e19532fe214fc6e45b9ee1f60bbe332456 (patch) | |
tree | c382866b78653aea157f085c9cdb8bd3695798e8 /src/gallium/drivers/ilo/shader | |
parent | cae7a2a0319e31eef0975edafc730efd3bd2c8d4 (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/drivers/ilo/shader')
-rw-r--r-- | src/gallium/drivers/ilo/shader/toy_tgsi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/ilo/shader/toy_tgsi.c b/src/gallium/drivers/ilo/shader/toy_tgsi.c index 57501eac337..65e47bf3a4a 100644 --- a/src/gallium/drivers/ilo/shader/toy_tgsi.c +++ b/src/gallium/drivers/ilo/shader/toy_tgsi.c @@ -2296,10 +2296,8 @@ add_imm(struct toy_tgsi *tgsi, enum toy_type type, const uint32_t *buf) cur_size * sizeof(new_types[0]), new_size * sizeof(new_types[0])); if (!new_buf || !new_types) { - if (new_buf) - FREE(new_buf); - if (new_types) - FREE(new_types); + FREE(new_buf); + FREE(new_types); return -1; } |