summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libspectre/spectre-device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libspectre/spectre-device.c b/libspectre/spectre-device.c
index 4a09518..708fcb0 100644
--- a/libspectre/spectre-device.c
+++ b/libspectre/spectre-device.c
@@ -72,6 +72,7 @@ spectre_presize (void *handle, void *device, int width, int height,
sd->height = height;
sd->row_length = raster;
sd->gs_image = NULL;
+ free(sd->user_image);
sd->user_image = malloc (sd->row_length * sd->height);
return 0;