xserver-multidpi/hw
Alan Coopersmith b2bc38e4a5 Even more correctly free config file names
If we didn't go into the if (!autoconfig) { } block, the filename,
dirname, and sysdirname pointers were never initialized, but we
freed them outside the block, leading to potential memory corruption.

Move the frees inside the block where they're initialized to avoid this.

To avoid similar problems, move the declarations of the variables that
are only used in this block inside the block.

Regression introduced by commit 3d635fe84d

Found by gcc warning:
xf86Config.c: In function 'xf86HandleConfigFile':
xf86Config.c:2303:11: warning: 'filename' may be used uninitialized in this function
xf86Config.c:2303:22: warning: 'dirname' may be used uninitialized in this function
xf86Config.c:2303:32: warning: 'sysdirname' may be used uninitialized in this function

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2011-12-12 16:50:25 -08:00
..
dmx Move to autoconf standard function name checks & defines 2011-12-05 14:32:45 -08:00
kdrive Merge remote-tracking branch 'airlied/reviewed-fixes' 2011-12-07 12:42:17 -08:00
vfb Move to autoconf standard function name checks & defines 2011-12-05 14:32:45 -08:00
xfree86 Even more correctly free config file names 2011-12-12 16:50:25 -08:00
xnest Fix builds of Xnest & Xephyr with Solaris Studio compilers 2011-12-05 14:33:00 -08:00
xquartz Convert strncpy/strncat to strlcpy/strlcat 2011-11-23 12:15:05 -08:00
xwin Move to autoconf standard function name checks & defines 2011-12-05 14:32:45 -08:00
Makefile.am Catch errors in recursive relink targets 2010-03-22 00:45:57 -05:00