[spice-common 5/8] mi: fix memory leak in miFillUniqueSpanGroup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---
 common/lines.c | 2 ++
 1 file changed, 2 insertions(+)

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;
                         }
-- 
1.8.4.2

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]