Fixed user_buffer memory leak

This commit is contained in:
Jakob Bornecrantz 2008-04-08 11:26:52 +02:00
parent d5d93a3158
commit 4c0f724323
2 changed files with 3 additions and 2 deletions

View file

@ -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;
}

View file

@ -431,7 +431,6 @@ driBOUnReference(struct _DriBufferObject *buf)
if (!buf)
return;
_glthread_LOCK_MUTEX(buf->mutex);
tmp = --buf->refCount;
if (!tmp) {