i915: use _mesa_delete_buffer_object
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 6 Jan 2016 02:51:13 +0000 (21:51 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 7 Jan 2016 22:07:09 +0000 (17:07 -0500)
This is more future-proof, plugs the memory leak of Label and properly
destroys the buffer mutex.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i915/intel_buffer_objects.c

index ef06743ed499d75a5e94660bc45fe604bbdaa62f..e6760964909e72124f2f582d2c4646e5e56b34da 100644 (file)
@@ -99,7 +99,7 @@ intel_bufferobj_free(struct gl_context * ctx, struct gl_buffer_object *obj)
    _mesa_align_free(intel_obj->sys_buffer);
 
    drm_intel_bo_unreference(intel_obj->buffer);
-   free(intel_obj);
+   _mesa_delete_buffer_object(ctx, obj);
 }