[PATCH xserver 1/6] xfree86: Free devlist returned by xf86MatchDevice

Hans de Goede hdegoede at redhat.com
Mon Dec 12 16:03:12 UTC 2016


xf86MatchDevice returns a dynamically allocated list of GDevPtr-s,
free this when we're done with it.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 hw/xfree86/common/xf86platformBus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 42789ca..c8378a5 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -480,6 +480,8 @@ xf86platformProbeDev(DriverPtr drvp)
                                         isGPUDevice(devList[i]) ? PLATFORM_PROBE_GPU_SCREEN : 0);
     }
 
+    free(devList);
+
     return foundScreen;
 }
 
@@ -506,6 +508,8 @@ xf86platformAddGPUDevices(DriverPtr drvp)
         }
     }
 
+    free(devList);
+
     return foundScreen;
 }
 
-- 
2.9.3



More information about the xorg-devel mailing list