diff options
author | Morgan Armand <[email protected]> | 2011-11-07 19:37:48 +0100 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-11-07 13:25:46 -0700 |
commit | 89d6044b7b70304bdd9ebab734d8b1c0826cbdb8 (patch) | |
tree | 9dffdf537c26565d8e254b2cfba1477548326b28 /src/gallium/drivers/softpipe/sp_state_derived.c | |
parent | dceb202297b39220fbbcb41267077fb3ff8d137a (diff) |
softpipe: fix memory leaks
This series of patches is a splitted version of my previous one, as suggested by Brian.
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_derived.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_derived.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c index fd688089a3e..f89d23c9f26 100644 --- a/src/gallium/drivers/softpipe/sp_state_derived.c +++ b/src/gallium/drivers/softpipe/sp_state_derived.c @@ -295,9 +295,12 @@ update_polygon_stipple_pattern(struct softpipe_context *softpipe) tex = util_pstipple_create_stipple_texture(&softpipe->pipe, softpipe->poly_stipple.stipple); pipe_resource_reference(&softpipe->pstipple.texture, tex); + pipe_resource_reference(&tex, NULL); - view = util_pstipple_create_sampler_view(&softpipe->pipe, tex); + view = util_pstipple_create_sampler_view(&softpipe->pipe, + softpipe->pstipple.texture); pipe_sampler_view_reference(&softpipe->pstipple.sampler_view, view); + pipe_sampler_view_reference(&view, NULL); } |