[Nouveau] [PATCH] free nvs->pass_rec on error in nouveau_shader_pass2(), nouveau_shader_2.c
Roel Kluin
12o3l at tiscali.nl
Tue Jan 29 15:56:27 PST 2008
in nouveau_shader_pass2()
210: struct pass2_rec *rec;
...
215: rec = calloc(1, sizeof(struct pass2_rec));
...
218: nvs->pass_rec = rec;
untested, please check.
--
also free nvs->pass_rec on error
Signed-off-by: Roel Kluin <12o3l at tiscali.nl>
---
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c
index cd27dac..0bbcb8a 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c
@@ -229,6 +229,8 @@ nouveau_shader_pass2(nvsPtr nvs)
((nvsSubroutine*)nvs->program_tree)->insn_head)) {
free(nvs->program);
nvs->program = NULL;
+ free(nvs->pass_rec);
+ nvs->pass_rec = NULL;
return GL_FALSE;
}
More information about the Nouveau
mailing list