[Mesa-dev] [PATCH 1/3] nouveau: don't keep stale pointer to free'd data
Francisco Jerez
currojerez at riseup.net
Sat Aug 16 10:55:32 PDT 2014
Ilia Mirkin <imirkin at alum.mit.edu> writes:
> If ->sys is non-null, we might decide that it's where the data is
> stored.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> Cc: <mesa-stable at lists.freedesktop.org>
> ---
> src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
> index 9a3d417..2bb633e 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) ||
> --
> 1.8.5.5
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140816/8f2c239a/attachment-0001.sig>
More information about the mesa-dev
mailing list