summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-19 12:42:05 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-19 12:42:05 -0600
commitffd37b1fda1c880028f2c353edbf4807d55b6844 (patch)
treefac9576eb65332341b33b33a2501341a366bf721 /src/mesa/drivers
parent257f0da6a2e9cc687c0cdc76c0fb326eab9e9ac9 (diff)
don't alloc region in xmesa_surface_alloc(), fixes a mem leak
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/x11/xm_surface.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/drivers/x11/xm_surface.c b/src/mesa/drivers/x11/xm_surface.c
index 86fecdb2f7..8d2c2ca5f3 100644
--- a/src/mesa/drivers/x11/xm_surface.c
+++ b/src/mesa/drivers/x11/xm_surface.c
@@ -284,6 +284,7 @@ xmesa_surface_alloc(struct pipe_context *pipe, GLuint pipeFormat)
{
struct xmesa_surface *xms = CALLOC_STRUCT(xmesa_surface);
+ assert(pipe);
assert(pipeFormat);
xms->surface.surface.format = pipeFormat;
@@ -293,9 +294,6 @@ xmesa_surface_alloc(struct pipe_context *pipe, GLuint pipeFormat)
*/
softpipe_init_surface_funcs(&xms->surface);
- assert(pipe);
- xms->surface.surface.region = pipe->region_alloc(pipe, 1, 1, 1, 0x0);
-
return &xms->surface.surface;
}