i965: use _mesa_delete_buffer_object
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 6 Jan 2016 02:51:27 +0000 (21:51 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 7 Jan 2016 22:07:12 +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/i965/intel_buffer_objects.c

index 7a5b3fca595e3f3db46eb97553d75d37fc015d5f..56da2da08a8dd2e76f374f5e65d45967e09b09de 100644 (file)
@@ -167,7 +167,7 @@ brw_delete_buffer(struct gl_context * ctx, struct gl_buffer_object *obj)
    _mesa_buffer_unmap_all_mappings(ctx, obj);
 
    drm_intel_bo_unreference(intel_obj->buffer);
-   free(intel_obj);
+   _mesa_delete_buffer_object(ctx, obj);
 }