diff options
author | Jakob Bornecrantz <[email protected]> | 2008-04-08 11:26:52 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2008-04-08 11:26:52 +0200 |
commit | 4c0f72432393e324d608474d24d20ebb465cb2ca (patch) | |
tree | 34b897b0822cd79c7dd00ed7611e7e2bfe2d718c /src/gallium/winsys | |
parent | d5d93a31580cf58744b4d186a4ab8fac09743a33 (diff) |
Fixed user_buffer memory leak
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/dri/intel/intel_winsys_pipe.c | 4 | ||||
-rw-r--r-- | src/gallium/winsys/dri/intel/ws_dri_bufmgr.c | 1 |
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) { |