summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index f315f0b212b..4ecbb5ecf66 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -222,7 +222,7 @@ _mesa_create_visual( GLboolean rgbFlag,
GLint accumAlphaBits,
GLint numSamples )
{
- GLvisual *vis = (GLvisual *) _mesa_calloc(sizeof(GLvisual));
+ GLvisual *vis = (GLvisual *) calloc(1, sizeof(GLvisual));
if (vis) {
if (!_mesa_initialize_visual(vis, rgbFlag, dbFlag, stereoFlag,
redBits, greenBits, blueBits, alphaBits,
@@ -230,7 +230,7 @@ _mesa_create_visual( GLboolean rgbFlag,
accumRedBits, accumGreenBits,
accumBlueBits, accumAlphaBits,
numSamples)) {
- _mesa_free(vis);
+ free(vis);
return NULL;
}
}
@@ -320,7 +320,7 @@ _mesa_initialize_visual( GLvisual *vis,
void
_mesa_destroy_visual( GLvisual *vis )
{
- _mesa_free(vis);
+ free(vis);
}
/*@}*/
@@ -755,7 +755,7 @@ alloc_dispatch_table(void)
GLint numEntries = MAX2(_glapi_get_dispatch_table_size(),
sizeof(struct _glapi_table) / sizeof(_glapi_proc));
struct _glapi_table *table =
- (struct _glapi_table *) _mesa_malloc(numEntries * sizeof(_glapi_proc));
+ (struct _glapi_table *) malloc(numEntries * sizeof(_glapi_proc));
if (table) {
_glapi_proc *entry = (_glapi_proc *) table;
GLint i;
@@ -850,7 +850,7 @@ _mesa_initialize_context(GLcontext *ctx,
if (!ctx->Exec || !ctx->Save) {
_mesa_release_shared_state(ctx, ctx->Shared);
if (ctx->Exec)
- _mesa_free(ctx->Exec);
+ free(ctx->Exec);
return GL_FALSE;
}
#if FEATURE_dispatch
@@ -913,7 +913,7 @@ _mesa_create_context(const GLvisual *visual,
ASSERT(visual);
/*ASSERT(driverContext);*/
- ctx = (GLcontext *) _mesa_calloc(sizeof(GLcontext));
+ ctx = (GLcontext *) calloc(1, sizeof(GLcontext));
if (!ctx)
return NULL;
@@ -922,7 +922,7 @@ _mesa_create_context(const GLvisual *visual,
return ctx;
}
else {
- _mesa_free(ctx);
+ free(ctx);
return NULL;
}
}
@@ -989,8 +989,8 @@ _mesa_free_context_data( GLcontext *ctx )
#endif
/* free dispatch tables */
- _mesa_free(ctx->Exec);
- _mesa_free(ctx->Save);
+ free(ctx->Exec);
+ free(ctx->Save);
/* Shared context state (display lists, textures, etc) */
_mesa_release_shared_state( ctx, ctx->Shared );
@@ -999,10 +999,10 @@ _mesa_free_context_data( GLcontext *ctx )
_mesa_free_display_list_data(ctx);
if (ctx->Extensions.String)
- _mesa_free((void *) ctx->Extensions.String);
+ free((void *) ctx->Extensions.String);
if (ctx->VersionString)
- _mesa_free(ctx->VersionString);
+ free(ctx->VersionString);
/* unbind the context if it's currently bound */
if (ctx == _mesa_get_current_context()) {
@@ -1023,7 +1023,7 @@ _mesa_destroy_context( GLcontext *ctx )
{
if (ctx) {
_mesa_free_context_data(ctx);
- _mesa_free( (void *) ctx );
+ free( (void *) ctx );
}
}