There was only one caller, an error path in mesa/st. But this is now
incorrect as we need align_free(). Just remove it.
Fixes:
55e853d823e ("mesa/st: Allocate the gl_context with 16-byte alignment.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8801>
/**
- * Destroy a struct gl_context structure.
- *
- * \param ctx GL context.
- *
- * Calls _mesa_free_context_data() and frees the gl_context object itself.
- */
-void
-_mesa_destroy_context( struct gl_context *ctx )
-{
- if (ctx) {
- _mesa_free_context_data(ctx, true);
- free( (void *) ctx );
- }
-}
-
-
-/**
* Copy attribute groups from one context to another.
*
* \param src source context
_mesa_free_context_data(struct gl_context *ctx, bool destroy_debug_output);
extern void
-_mesa_destroy_context( struct gl_context *ctx );
-
-
-extern void
_mesa_copy_context(const struct gl_context *src, struct gl_context *dst, GLuint mask);
extern GLboolean
st = st_create_context_priv(ctx, pipe, options, no_error);
if (!st) {
- _mesa_destroy_context(ctx);
+ _mesa_free_context_data(ctx, true);
+ align_free(ctx);
}
return st;