summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/dri/intel
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2008-04-08 11:26:52 +0200
committerJakob Bornecrantz <[email protected]>2008-04-08 11:26:52 +0200
commit4c0f72432393e324d608474d24d20ebb465cb2ca (patch)
tree34b897b0822cd79c7dd00ed7611e7e2bfe2d718c /src/gallium/winsys/dri/intel
parentd5d93a31580cf58744b4d186a4ab8fac09743a33 (diff)
Fixed user_buffer memory leak
Diffstat (limited to 'src/gallium/winsys/dri/intel')
-rw-r--r--src/gallium/winsys/dri/intel/intel_winsys_pipe.c4
-rw-r--r--src/gallium/winsys/dri/intel/ws_dri_bufmgr.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/winsys/dri/intel/intel_winsys_pipe.c b/src/gallium/winsys/dri/intel/intel_winsys_pipe.c
index 59729a0245d..40902197e1a 100644
--- a/src/gallium/winsys/dri/intel/intel_winsys_pipe.c
+++ b/src/gallium/winsys/dri/intel/intel_winsys_pipe.c
@@ -156,7 +156,9 @@ intel_user_buffer_create(struct pipe_winsys *winsys, void *ptr, unsigned bytes)
struct intel_pipe_winsys *iws = intel_pipe_winsys(winsys);
driGenUserBuffer( iws->regionPool,
- "pipe user buffer", &buffer->driBO, ptr, bytes );
+ "pipe user buffer", &buffer->driBO, ptr, bytes );
+
+ buffer->base.refcount = 1;
return &buffer->base;
}
diff --git a/src/gallium/winsys/dri/intel/ws_dri_bufmgr.c b/src/gallium/winsys/dri/intel/ws_dri_bufmgr.c
index eb5216cb372..bf387f672b3 100644
--- a/src/gallium/winsys/dri/intel/ws_dri_bufmgr.c
+++ b/src/gallium/winsys/dri/intel/ws_dri_bufmgr.c
@@ -431,7 +431,6 @@ driBOUnReference(struct _DriBufferObject *buf)
if (!buf)
return;
-
_glthread_LOCK_MUTEX(buf->mutex);
tmp = --buf->refCount;
if (!tmp) {