aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv40/nv40_state_viewport.c
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-05-30 11:04:55 +1000
committerBen Skeggs <[email protected]>2008-05-30 11:04:55 +1000
commit996b549fdbfe772ee56a51858e81e93bccaae5c5 (patch)
tree1c0667f1aa37ecbf2372c5762720236aa73e47e7 /src/gallium/drivers/nv40/nv40_state_viewport.c
parent8b31d5fc8a5425b01adf80f4873cb816925ee0d1 (diff)
nv40: a couple of memory leaks
Diffstat (limited to 'src/gallium/drivers/nv40/nv40_state_viewport.c')
-rw-r--r--src/gallium/drivers/nv40/nv40_state_viewport.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv40/nv40_state_viewport.c b/src/gallium/drivers/nv40/nv40_state_viewport.c
index 1b6248e5b8e..869a55b4053 100644
--- a/src/gallium/drivers/nv40/nv40_state_viewport.c
+++ b/src/gallium/drivers/nv40/nv40_state_viewport.c
@@ -3,8 +3,8 @@
static boolean
nv40_state_viewport_validate(struct nv40_context *nv40)
{
- struct nouveau_stateobj *so = so_new(11, 0);
struct pipe_viewport_state *vpt = &nv40->viewport;
+ struct nouveau_stateobj *so;
unsigned bypass;
if (nv40->render_mode == HW && !nv40->rasterizer->pipe.bypass_clipping)
@@ -18,6 +18,7 @@ nv40_state_viewport_validate(struct nv40_context *nv40)
return FALSE;
nv40->state.viewport_bypass = bypass;
+ so = so_new(11, 0);
if (!bypass) {
so_method(so, nv40->screen->curie,
NV40TCL_VIEWPORT_TRANSLATE_X, 8);