diff options
author | Brian Paul <[email protected]> | 2014-04-09 19:27:06 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-04-10 07:53:05 -0600 |
commit | 7fbb8ba4997060f53c345288d8983b61177f0014 (patch) | |
tree | f94dfdc5121d87e9c31252c8cc8094aec937ac32 /src/mesa/main/attrib.c | |
parent | f9985db0bc1f1fa217a0fa30a608cb78ccd79a50 (diff) |
mesa: use malloc/free instead of MALLOC/FREE in attrib stack code
We moved away from MALLOC/FREE in the rest of core Mesa a while ago.
Reviewed-by: Jakob Bornecrantz <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r-- | src/mesa/main/attrib.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 5a626f2f442..c656845dff9 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -217,7 +217,7 @@ push_attrib(struct gl_context *ctx, struct gl_attrib_node **head, { void *attribute; - attribute = MALLOC(attr_size); + attribute = malloc(attr_size); if (attribute == NULL) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); return false; @@ -227,7 +227,7 @@ push_attrib(struct gl_context *ctx, struct gl_attrib_node **head, memcpy(attribute, attr_data, attr_size); } else { - FREE(attribute); + free(attribute); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); return false; } @@ -277,7 +277,7 @@ _mesa_PushAttrib(GLbitfield mask) attr->DrawBuffer[i] = ctx->DrawBuffer->ColorDrawBuffer[i]; } else { - FREE(attr); + free(attr); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); goto end; } @@ -374,7 +374,7 @@ _mesa_PushAttrib(GLbitfield mask) attr->FragmentProgram = ctx->FragmentProgram.Enabled; if (!save_attrib_data(&head, GL_ENABLE_BIT, attr)) { - FREE(attr); + free(attr); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); goto end; } @@ -440,7 +440,7 @@ _mesa_PushAttrib(GLbitfield mask) attr->ReadBuffer = ctx->ReadBuffer->ColorReadBuffer; } else { - FREE(attr); + free(attr); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); goto end; } @@ -491,7 +491,7 @@ _mesa_PushAttrib(GLbitfield mask) } if (!save_attrib_data(&head, GL_TEXTURE_BIT, texstate)) { - FREE(texstate); + free(texstate); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib(GL_TEXTURE_BIT)"); goto end; } @@ -1626,7 +1626,7 @@ _mesa_PushClientAttrib(GLbitfield mask) } else { _mesa_error( ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib" ); - FREE(attr); + free(attr); goto end; } @@ -1642,7 +1642,7 @@ _mesa_PushClientAttrib(GLbitfield mask) } else { _mesa_error( ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib" ); - FREE(attr); + free(attr); goto end; } } @@ -1656,7 +1656,7 @@ _mesa_PushClientAttrib(GLbitfield mask) } if (!init_array_attrib_data(ctx, attr)) { - FREE(attr); + free(attr); goto end; } @@ -1666,7 +1666,7 @@ _mesa_PushClientAttrib(GLbitfield mask) else { free_array_attrib_data(ctx, attr); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib"); - FREE(attr); + free(attr); /* goto to keep safe from possible later changes */ goto end; } |