summaryrefslogtreecommitdiffstats
path: root/common/canvas_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/canvas_base.c')
-rw-r--r--common/canvas_base.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/common/canvas_base.c b/common/canvas_base.c
index d11c8ec0..16688fb3 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -749,9 +749,7 @@ static pixman_image_t *canvas_get_lz(CanvasBase *canvas, SpiceImage *image, int
int free_palette;
if (setjmp(lz_data->jmp_env)) {
- if (decomp_buf) {
- free(decomp_buf);
- }
+ free(decomp_buf);
CANVAS_ERROR("lz error, %s", lz_data->message_buf);
}
@@ -3134,9 +3132,7 @@ static void canvas_draw_stroke(SpiceCanvas *spice_canvas, SpiceRect *bbox,
stroke_lines_draw(&lines, (lineGC *)&gc, dashed);
- if (gc.base.dash) {
- free(gc.base.dash);
- }
+ free(gc.base.dash);
stroke_lines_free(&lines);
if (!gc.solid && gc.tile && !surface_canvas) {