diff options
Diffstat (limited to 'mesalib/src/mesa/swrast/s_context.c')
-rw-r--r-- | mesalib/src/mesa/swrast/s_context.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c index 4ed7b94c7..53497bc9c 100644 --- a/mesalib/src/mesa/swrast/s_context.c +++ b/mesalib/src/mesa/swrast/s_context.c @@ -720,7 +720,7 @@ GLboolean _swrast_CreateContext( struct gl_context *ctx ) { GLuint i; - SWcontext *swrast = (SWcontext *)CALLOC(sizeof(SWcontext)); + SWcontext *swrast = (SWcontext *) calloc(1, sizeof(SWcontext)); #ifdef _OPENMP const GLuint maxThreads = omp_get_max_threads(); #else @@ -775,9 +775,9 @@ _swrast_CreateContext( struct gl_context *ctx ) * using multiple threads, it is necessary to have one SpanArrays instance * per thread. */ - swrast->SpanArrays = (SWspanarrays *) MALLOC(maxThreads * sizeof(SWspanarrays)); + swrast->SpanArrays = (SWspanarrays *) malloc(maxThreads * sizeof(SWspanarrays)); if (!swrast->SpanArrays) { - FREE(swrast); + free(swrast); return GL_FALSE; } for(i = 0; i < maxThreads; i++) { @@ -828,17 +828,17 @@ _swrast_DestroyContext( struct gl_context *ctx ) _mesa_debug(ctx, "_swrast_DestroyContext\n"); } - FREE( swrast->SpanArrays ); + free( swrast->SpanArrays ); if (swrast->ZoomedArrays) - FREE( swrast->ZoomedArrays ); - FREE( swrast->TexelBuffer ); + free( swrast->ZoomedArrays ); + free( swrast->TexelBuffer ); free(swrast->stencil_temp.buf1); free(swrast->stencil_temp.buf2); free(swrast->stencil_temp.buf3); free(swrast->stencil_temp.buf4); - FREE( swrast ); + free( swrast ); ctx->swrast_context = 0; } |