Roel Kluin
2008-Jan-29 23:56 UTC
[Nouveau] [PATCH] free nvs->pass_rec on error in nouveau_shader_pass2(), nouveau_shader_2.c
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; }
Stephane Marchesin
2008-Jan-30 00:36 UTC
[Nouveau] [PATCH] free nvs->pass_rec on error in nouveau_shader_pass2(), nouveau_shader_2.c
Hi Roel, All your patches correct valid flaws. However, as you might have noticed, the old DRI code doesn't see much development at the moment. The reason is that we've decided to jump in the gallium3D wagon before it was even finished. So you have to know that this piece of code is currently not maintained, and that you'd have to finish it by yourself mostly. I can of course push your patches if you feel like actually working on finishing this old-scheme DRI driver. Just tell me. Stephane