Fixes a small leak in a seldom-hit corner case for VS/FS compilation.
Found with coverity.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
" using dummy shader instead.\n",
(unsigned) (variant->nr_tokens
* sizeof(variant->tokens[0])));
+ /* Free the too-large variant */
+ svga_destroy_shader_variant(svga, SVGA3D_SHADERTYPE_PS, variant);
+ /* Use simple pass-through shader instead */
variant = get_compiled_dummy_shader(svga, fs, key);
if (!variant) {
ret = PIPE_ERROR;
" using dummy shader instead.\n",
(unsigned) (variant->nr_tokens
* sizeof(variant->tokens[0])));
+ /* Free the too-large variant */
+ svga_destroy_shader_variant(svga, SVGA3D_SHADERTYPE_VS, variant);
+ /* Use simple pass-through shader instead */
variant = get_compiled_dummy_vertex_shader(svga, vs, key);
if (!variant) {
ret = PIPE_ERROR;