From 6dc71f6b2c7ff49adb504426b4cd206e4745e1e3 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 18 Feb 2008 17:52:37 +1030 Subject: [PATCH] xfree86: plug memory leak in InitPathList. All the failure paths were very diligent in freeing the "fullpath" temporary string, but the success case was not. All the content only got strdup()d, so it's not live memory anymore. Signed-off-by: Peter Hutterer --- hw/xfree86/loader/loadmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index 650dcf35c..7f3bbe49c 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -177,6 +177,7 @@ InitPathList(const char *path) } if (list) list[n] = NULL; + xfree(fullpath); return list; }