st/mesa: use _mesa_delete_buffer_object

This is more future-proof than the current code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 1c2187b1c2)
This commit is contained in:
Nicolai Hähnle 2016-01-05 21:49:11 -05:00 committed by Emil Velikov
parent feea2407e4
commit 19c8a5bf7e

View file

@ -83,9 +83,7 @@ st_bufferobj_free(struct gl_context *ctx, struct gl_buffer_object *obj)
if (st_obj->buffer)
pipe_resource_reference(&st_obj->buffer, NULL);
mtx_destroy(&st_obj->Base.Mutex);
free(st_obj->Base.Label);
free(st_obj);
_mesa_delete_buffer_object(ctx, obj);
}