[Mesa-dev] [PATCH v2] gallium/tgsi: fix memory leak in tgsi sanity check
Li Qiang
liq3ea at gmail.com
Tue Jan 24 07:02:25 UTC 2017
Fix the leak of some ctx fields in error path.
Suggested-by: Marc-André Lureau <mlureau at redhat.com>
Signed-off-by: Li Qiang <liq3ea at gmail.com>
---
src/gallium/auxiliary/tgsi/tgsi_sanity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
index f867925..67d5cc4 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
@@ -581,7 +581,7 @@ tgsi_sanity_check(
ctx.print = debug_get_option_print_sanity();
if (!tgsi_iterate_shader( tokens, &ctx.iter ))
- return FALSE;
+ ctx.errors = 1;
regs_hash_destroy(ctx.regs_decl);
regs_hash_destroy(ctx.regs_used);
--
2.7.4
More information about the mesa-dev
mailing list