mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-17 08:10:33 +01:00
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>
This commit is contained in:
parent
1f4bc0c95e
commit
ef130b6050
1 changed files with 1 additions and 0 deletions
|
|
@ -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) ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue