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:
parent
45d00433e7
commit
1bec6ad897
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user