[Spice-devel] [PATCH] [xf86-video-qxl] Free the region pointer as well; eliminates a memory leak in dfps mode.

Jeremy White jwhite at codeweavers.com
Mon Aug 18 11:40:09 PDT 2014


Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
 src/dfps.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/dfps.c b/src/dfps.c
index 5cc1890..4ab20a8 100644
--- a/src/dfps.c
+++ b/src/dfps.c
@@ -169,6 +169,7 @@ static void dfps_solid (PixmapPtr pixmap, int x_1, int y_1, int x_2, int y_2)
     RegionAppend(&info->updated_region, region);
     RegionValidate(&info->updated_region, &throwaway_bool);
     RegionUninit(region);
+    RegionDestroy(region);
     return;
 }
 
@@ -229,6 +230,7 @@ static void dfps_copy (PixmapPtr dest,
     RegionAppend(&info->updated_region, region);
     RegionValidate(&info->updated_region, &throwaway_bool);
     RegionUninit(region);
+    RegionDestroy(region);
 }
 
 static void dfps_done_copy (PixmapPtr dest)
@@ -258,6 +260,7 @@ static Bool dfps_put_image (PixmapPtr dest, int x, int y, int w, int h,
     RegionAppend(&info->updated_region, region);
     RegionValidate(&info->updated_region, &throwaway_bool);
     RegionUninit(region);
+    RegionDestroy(region);
 
     /* We can avoid doing the put image ourselves, as the uxa driver
        will fall back and do it for us if we return false */
-- 
1.7.10.4



More information about the Spice-devel mailing list