diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-09-12 14:07:48 -0700 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-09-12 14:07:48 -0700 |
commit | 149945c432115ef27788216063dd453624caa9e9 (patch) | |
tree | ae533a45158e872c9cef26a75dd6d60cf8036923 /src/gallium/auxiliary/tgsi | |
parent | e90fb86ac3f3a000c91d2cd9fab2bf27d4ede0e7 (diff) |
tgsi: free tokens on error
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r-- | 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 0780e2e063..e24a0ad776 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; |