xserver-multidpi/hw/xfree86
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
..
common Even more correctly free config file names 2011-12-12 16:50:25 -08:00
ddc Remove redundant redeclarations of functions in the same header file 2011-11-23 12:15:07 -08:00
dixmods xfree86: Link modules with -module 2011-10-15 21:18:47 -07:00
doc Fix gcc -Wwrite-strings warnings in xf86 ddx 2011-11-23 12:15:07 -08:00
dri Use internal temp variable for swap macros 2011-09-21 17:12:04 -04:00
dri2 dri2: Register the DRI2DrawableType after server regeneration 2011-11-18 11:26:03 -08:00
exa xfree86: Link modules with -module 2011-10-15 21:18:47 -07:00
fbdevhw fbdevhw: iterate over all modes that match a mode. (v3) 2011-12-06 16:00:35 +00:00
i2c Fix gcc -Wwrite-strings warnings in xf86 ddx 2011-11-23 12:15:07 -08:00
int10 int10: Port internal users off xf86MapVidMem 2011-10-15 21:18:46 -07:00
loader LoaderOpen returns either a valid pointer or NULL, so don't check for < 0 2011-12-05 14:33:00 -08:00
man xorg.conf.man: fix 382: warning: missing )' (got R') #35054 2011-10-19 17:22:18 -07:00
modes Fix gcc -Wwrite-strings warnings in xf86Modes code 2011-11-23 12:15:07 -08:00
os-support sun_agp: cast key to uintptr_t before casting to (int *) 2011-11-23 12:15:06 -08:00
parser hw/xfree86: fix segfault in config parser when config dir is missing 2011-12-07 12:13:37 -08:00
ramdac Fix gcc -Wwrite-strings warnings in xf86 ddx 2011-11-23 12:15:07 -08:00
shadowfb xfree86: Link modules with -module 2011-10-15 21:18:47 -07:00
utils Fix gcc -Wwrite-strings warnings in xf86 ddx 2011-11-23 12:15:07 -08:00
vbe Fix gcc -Wwrite-strings warnings in xf86 ddx 2011-11-23 12:15:07 -08:00
vgahw pci: Remove xf86MapDomainMemory 2011-10-15 21:18:46 -07:00
x86emu Convert a bunch of sprintf to snprintf calls 2011-11-23 12:15:06 -08:00
xaa Merge remote-tracking branch 'whot/for-keith' 2011-12-08 20:57:26 -08:00
.gitignore xfree86: Move sdksyms generation to ddx toplevel 2011-06-23 05:28:31 -07:00
Makefile.am sdksyms.sh may not be executable. 2011-10-01 17:35:19 +02:00
sdksyms.sh xfree86: Deprecate the use of xf86PciInfo.h 2011-11-18 11:26:02 -08:00
xorgconf.cpp xfree86: use sed rather than cpp to perform string substitutions 2011-01-18 15:11:14 -08:00