diff options
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_context.c | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_drawpix.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_renderbuffer.c | 12 | ||||
-rw-r--r-- | src/mesa/swrast/s_texture.c | 6 |
4 files changed, 8 insertions, 17 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index d5acaee8312..31a12dade1a 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -829,8 +829,7 @@ _swrast_DestroyContext( struct gl_context *ctx ) } free( swrast->SpanArrays ); - if (swrast->ZoomedArrays) - free( swrast->ZoomedArrays ); + free( swrast->ZoomedArrays ); free( swrast->TexelBuffer ); free(swrast->stencil_temp.buf1); diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 93d2d352922..7665408fd13 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -493,9 +493,7 @@ draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y, span.array->ChanType = CHAN_TYPE; } - if (convImage) { - free(convImage); - } + free(convImage); swrast_render_finish(ctx); } diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c index e468bdb16b0..b1fb57823f4 100644 --- a/src/mesa/swrast/s_renderbuffer.c +++ b/src/mesa/swrast/s_renderbuffer.c @@ -119,10 +119,8 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, bpp = _mesa_get_format_bytes(rb->Format); /* free old buffer storage */ - if (srb->Buffer) { - free(srb->Buffer); - srb->Buffer = NULL; - } + free(srb->Buffer); + srb->Buffer = NULL; srb->RowStride = width * bpp; @@ -170,10 +168,8 @@ soft_renderbuffer_delete(struct gl_renderbuffer *rb) { struct swrast_renderbuffer *srb = swrast_renderbuffer(rb); - if (srb->Buffer) { - free(srb->Buffer); - srb->Buffer = NULL; - } + free(srb->Buffer); + srb->Buffer = NULL; _mesa_delete_renderbuffer(rb); } diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index defe669941f..8ae3d5bd0e6 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -144,10 +144,8 @@ _swrast_free_texture_image_buffer(struct gl_context *ctx, swImage->Buffer = NULL; } - if (swImage->ImageOffsets) { - free(swImage->ImageOffsets); - swImage->ImageOffsets = NULL; - } + free(swImage->ImageOffsets); + swImage->ImageOffsets = NULL; } |