radeonsi: fix a GS copy shader leak
authorMarek Olšák <marek.olsak@amd.com>
Thu, 8 Oct 2015 22:54:17 +0000 (00:54 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 17 Oct 2015 19:40:03 +0000 (21:40 +0200)
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index 085794ba3b3b32491eb10bf7c447c6162077b601..49ab9404b81981be7a70736a74394904984adcc7 100644 (file)
@@ -4193,8 +4193,10 @@ out:
 
 void si_shader_destroy(struct si_shader *shader)
 {
-       if (shader->gs_copy_shader)
+       if (shader->gs_copy_shader) {
                si_shader_destroy(shader->gs_copy_shader);
+               FREE(shader->gs_copy_shader);
+       }
 
        if (shader->scratch_bo)
                r600_resource_reference(&shader->scratch_bo, NULL);