aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi/mizerline.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/mi/mizerline.c')
-rw-r--r--xorg-server/mi/mizerline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xorg-server/mi/mizerline.c b/xorg-server/mi/mizerline.c
index d37e1cc96..709e93422 100644
--- a/xorg-server/mi/mizerline.c
+++ b/xorg-server/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;