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 <peter@cs.unisa.edu.au>
This commit is contained in:
Arjan van de Ven 2008-02-18 17:52:37 +10:30 committed by Peter Hutterer
parent 1bec6ad897
commit 6dc71f6b2c

View File

@ -177,6 +177,7 @@ InitPathList(const char *path)
}
if (list)
list[n] = NULL;
xfree(fullpath);
return list;
}