summaryrefslogtreecommitdiff
path: root/mi/mizerline.c
diff options
context:
space:
mode:
Diffstat (limited to 'mi/mizerline.c')
-rw-r--r--mi/mizerline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mi/mizerline.c b/mi/mizerline.c
index 07cfbe113..7077b5198 100644
--- a/mi/mizerline.c
+++ b/mi/mizerline.c
@@ -157,9 +157,11 @@ miZeroLine(
list_len = (height >= width) ? height : width;
pspanInit = malloc(list_len * sizeof(DDXPointRec));
pwidthInit = malloc(list_len * sizeof(int));
- if (!pspanInit || !pwidthInit)
+ if (!pspanInit || !pwidthInit) {
+ free(pspanInit);
+ free(pwidthInit);
return;
-
+ }
Nspans = 0;
new_span = TRUE;
spans = pspanInit - 1;