xfree86: plug memory leak in xf86LogInit()

xf86LogInit allocates a piece of memory, stores it in lf. LogInit() will then
effectively strdup it, but lf is never freed again.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
This commit is contained in:
Arjan van de Ven 2008-02-18 17:46:04 +10:30 committed by Peter Hutterer
parent 45d00433e7
commit 1bec6ad897

View File

@ -1353,7 +1353,7 @@ xf86ErrorF(const char *format, ...)
void
xf86LogInit()
{
char *lf;
char *lf = NULL;
#define LOGSUFFIX ".log"
#define LOGOLDSUFFIX ".old"
@ -1377,6 +1377,8 @@ xf86LogInit()
#undef LOGSUFFIX
#undef LOGOLDSUFFIX
free(lf);
}
void