From 1057bb9fa53119fc0f6167379505728c888e05d0 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Tue, 7 Nov 2017 20:26:00 +0000 Subject: [PATCH] Fix free memory when not allocated Bug fix by Alex Haley --- backend/raster.c | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/raster.c b/backend/raster.c index 82ce3c41..1e8d650a 100644 --- a/backend/raster.c +++ b/backend/raster.c @@ -508,7 +508,6 @@ int plot_raster_maxicode(struct zint_symbol *symbol, int rotate_angle, int data_ if (!(scaled_hexagon = (char *) malloc(hexagon_size * hexagon_size))) { strcpy(symbol->errtxt, "656: Insufficient memory for pixel buffer"); - free(scaled_hexagon); free(pixelbuf); return ZINT_ERROR_ENCODING_PROBLEM; } else {