From: Ilia Mirkin Date: Sat, 16 Aug 2014 06:46:01 +0000 (-0400) Subject: nouveau: don't keep stale pointer to free'd data X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef130b6050fc91c12a220f19d8bdd659712f7fb9;p=mesa.git 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 Signed-off-by: Ilia Mirkin Cc: --- 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) ||