xserver-multidpi/hw/xfree86/parser
Paulo Zanoni 3d635fe84d Correctly free config file names
We call xf86penConfigDirFiles twice, so we overwrite the configDirPath
variable, losing the pointer. If we move the pointer management to the
upper layer (the function callers), they will be able to call these
functions as many times as they want, but they'll have to free those
returned values.

v2: don't leak inside XWin

4,097 bytes in 1 blocks are definitely lost in loss record 625 of 632
   at 0x4C2779D: malloc (in vgpreload_memcheck-amd64-linux.so)
   by 0x4D7899: DoSubstitution (scan.c:615)
   by 0x4D87B0: OpenConfigDir (scan.c:845)
   by 0x4D8A2D: xf86openConfigDirFiles (scan.c:955)
   by 0x49031F: xf86HandleConfigFile (xf86Config.c:2327)
   by 0x49A9BF: InitOutput (xf86Init.c:365)
   by 0x425A7A: main (main.c:204)

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2011-11-24 17:47:37 -02:00
..
Configint.h xfree86: Purge parsePrologueVoid. 2010-08-27 19:05:43 -04:00
configProcs.h Fix gcc -Wwrite-strings warnings in xf86 ddx 2011-11-23 12:15:07 -08:00
Device.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
DRI.c dri1: Remove "buffers" from the config logic 2010-10-18 15:34:08 -04:00
Extensions.c config: Remove useless xf86conf{{m,c,re}alloc},free} macros 2009-04-06 17:56:49 -04:00
Files.c config: Remove useless xf86conf{{m,c,re}alloc},free} macros 2009-04-06 17:56:49 -04:00
Flags.c Fix gcc -Wwrite-strings warnings in xf86 ddx 2011-11-23 12:15:07 -08:00
Input.c xfree86: parser: Never use constant strings for driver names (fixes #17438) 2010-08-13 11:43:18 +10:00
InputClass.c xfree86: Allow "MatchLayout" statements in config files 2011-05-25 08:23:58 +10:00
Layout.c input: switch InputOption to use XF86OptionRec storage. 2011-10-25 14:06:39 +10:00
Makefile.am xfree86: switch options from pointer to XF86OptionPtr 2011-09-27 11:43:36 +10:00
Module.c config: Remove useless xf86conf{{m,c,re}alloc},free} macros 2009-04-06 17:56:49 -04:00
Monitor.c xfree86: parser: Remove 'CUSTOM' flag option in Monitor section. 2010-11-10 21:35:58 -08:00
Pointer.c xfree86: warning fix 2011-03-28 13:00:58 -04:00
read.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
scan.c Correctly free config file names 2011-11-24 17:47:37 -02:00
Screen.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
Vendor.c config: Remove useless xf86conf{{m,c,re}alloc},free} macros 2009-04-06 17:56:49 -04:00
Video.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
write.c os/xfree86: remove macro checking for POSIX symbols 2010-09-10 21:49:28 +03:00
xf86Optrec.h Fix gcc -Wwrite-strings warnings in xf86 ddx 2011-11-23 12:15:07 -08:00
xf86Parser.h Correctly free config file names 2011-11-24 17:47:37 -02:00
xf86tokens.h Remove unused vtSysreq 2011-09-29 23:05:35 +06:00