All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] free nvs->pass_rec on error in nouveau_shader_pass2(), nouveau_shader_2.c
@ 2008-01-29 23:56 Roel Kluin
       [not found] ` <479FBD2B.3020309-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Roel Kluin @ 2008-01-29 23:56 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
---
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;
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-30 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-29 23:56 [PATCH] free nvs->pass_rec on error in nouveau_shader_pass2(), nouveau_shader_2.c Roel Kluin
     [not found] ` <479FBD2B.3020309-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
2008-01-30  0:36   ` Stephane Marchesin
     [not found]     ` <6a89f9d50801291636j32cb1e39j79c4a921b3c3a9d2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-01-30 11:34       ` Roel Kluin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.