From: Keith Whitwell Date: Sat, 12 Sep 2009 21:07:48 +0000 (-0700) Subject: tgsi: free tokens on error X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=149945c432115ef27788216063dd453624caa9e9;p=mesa.git tgsi: free tokens on error --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 0780e2e0635..e24a0ad776e 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;