summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-01-03 16:25:20 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2014-01-07 13:55:51 +0100
commitae39a05620706af3a3a6590baa66729ae6bde6e1 (patch)
tree4cf8790cdd958f71c3d3860220284e0b246a9f4d
parentd8e49b71d4dcddc9f1bdf78e759d0d30a2e48934 (diff)
mi: fix memory leak in miFillUniqueSpanGroup
This is based off the corresponding xserver commit from Tiago Vignatti: http://cgit.freedesktop.org/xorg/xserver/commit/mi/mispans.c?id=7ae46b69ba3f05f46529131e6a864904967cde3a Since xrealloc is #defined to spice_realloc which aborts on failure, this block is dead code, but I prefer to stay as close as possible to the upstream xserver code this is based on.
-rw-r--r--common/lines.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/lines.c b/common/lines.c
index adf1479..5b26662 100644
--- a/common/lines.c
+++ b/common/lines.c
@@ -814,6 +814,8 @@ miFillUniqueSpanGroup (GCPtr pGC, SpanGroup * spanGroup, Boolean foreground)
}
xfree (yspans);
xfree (ysizes);
+ xfree (newpoints);
+ xfree (newwidths);
miDisposeSpanGroup (spanGroup);
return;
}