summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-08-16 02:46:01 -0400
committerEmil Velikov <emil.l.velikov@gmail.com>2014-08-27 13:38:29 +0100
commitfa03aa9a8a605c1ba099178f82f0c9ccb6f5fdd8 (patch)
tree5527aaca013c6d790959710366a94f6d3d7a9461 /src
parent301a23c624fa23c0630de2b1b4833ec21418fe2f (diff)
nouveau: don't keep stale pointer to free'd data
If ->sys is non-null, we might decide that it's where the data is stored. Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: <mesa-stable@lists.freedesktop.org> (cherry picked from commit ef130b6050fc91c12a220f19d8bdd659712f7fb9)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
index 9a3d41739b9..2bb633e1047 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
@@ -86,6 +86,7 @@ nouveau_bufferobj_data(struct gl_context *ctx, GLenum target, GLsizeiptrARB size
/* Free previous storage */
nouveau_bo_ref(NULL, &nbo->bo);
free(nbo->sys);
+ nbo->sys = NULL;
if (target == GL_ELEMENT_ARRAY_BUFFER_ARB ||
(size < 512 && usage == GL_DYNAMIC_DRAW_ARB) ||