Mesa (master): tgsi: free tokens on error
Keith Whitwell
keithw at kemper.freedesktop.org
Sat Sep 12 21:46:43 UTC 2009
Module: Mesa
Branch: master
Commit: 149945c432115ef27788216063dd453624caa9e9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=149945c432115ef27788216063dd453624caa9e9
Author: Keith Whitwell <keithw at vmware.com>
Date: Sat Sep 12 14:07:48 2009 -0700
tgsi: free tokens on error
---
src/gallium/auxiliary/tgsi/tgsi_ureg.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 0780e2e..e24a0ad 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -120,6 +120,9 @@ static union tgsi_any_token error_tokens[32];
static void tokens_error( struct ureg_tokens *tokens )
{
+ if (tokens->tokens && tokens->tokens != error_tokens)
+ FREE(tokens->tokens);
+
tokens->tokens = error_tokens;
tokens->size = Elements(error_tokens);
tokens->count = 0;
More information about the mesa-commit
mailing list