xserver/hw/xfree86/common
Alan Coopersmith 563db909bc Avoid memory leak on realloc failure in localRegisterFreeBoxCallback
Also avoids leaving invalid pointers in structures if realloc had to
move them elsewhere to make them larger.

Found by parfait 1.1 code analyzer:
   Memory leak of pointer 'newCallbacks' allocated with realloc(((char*)offman->FreeBoxesUpdateCallback), (8 * (offman->NumCallbacks + 1)))
        at line 328 of hw/xfree86/common/xf86fbman.c in function 'localRegisterFreeBoxCallback'.
          'newCallbacks' allocated at line 320 with realloc(((char*)offman->FreeBoxesUpdateCallback), (8 * (offman->NumCallbacks + 1))).
          newCallbacks leaks when newCallbacks != NULL at line 327.
   Memory leak of pointer 'newPrivates' allocated with realloc(((char*)offman->devPrivates), (8 * (offman->NumCallbacks + 1)))
        at line 328 of hw/xfree86/common/xf86fbman.c in function 'localRegisterFreeBoxCallback'.
          'newPrivates' allocated at line 324 with realloc(((char*)offman->devPrivates), (8 * (offman->NumCallbacks + 1))).
          newPrivates leaks when newCallbacks == NULL at line 327.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-05 18:34:49 -08:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
Makefile.am Fix compilation of Xorg DDX without XF86VIDMODE 2012-10-11 12:54:11 +01:00
compiler.h Provide prototypes for Mmio functions for Solaris Studio on SPARC 2012-06-05 16:28:54 -07:00
dgaproc.h DGA: Remove excessive module-induced indirection 2012-07-09 23:40:55 -07:00
extramodes Remove some default modes that really shouldn't be in the default set. 2008-06-24 10:40:36 -04:00
fourcc.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
modeline2c.awk Remove some OS/2 leftovers. 2009-04-06 10:58:47 -04:00
vesamodes
vidmodeproc.h Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
xaarop.h xfree86: Drop some dead XAA decls from SDK headers 2012-07-25 14:03:31 -07:00
xf86.h xfree86: add xf86UpdateDesktopDimensions() 2012-10-08 12:40:49 +10:00
xf86AutoConfig.c xf86: include xf86platformBus.h in xf86AutoConfig.c 2012-07-12 19:23:42 -07:00
xf86Build.h.in Print the build time as well as the date if we can. 2007-06-04 02:03:44 -04:00
xf86Bus.c Merge remote-tracking branch 'ajax/ioperm' 2012-09-20 17:26:48 +02:00
xf86Bus.h xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86Config.c Move DRI2 from external module to built-in 2012-07-10 00:31:01 -07:00
xf86Config.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Configure.c xfree86: Change the semantics of driverFunc(GET_REQUIRED_HW_INTERFACES) 2012-09-20 11:07:27 -04:00
xf86Cursor.c xfree86: drop ddx-specific SIGIO blocking 2012-07-03 15:56:35 +10:00
xf86DGA.c xfree86: update the device state for all DGA events (#59100) 2013-01-11 14:57:40 +10:00
xf86DPMS.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86Events.c xfree86: don't access the old input handler after freeing it 2013-01-11 14:57:48 +10:00
xf86Extensions.c Constify extensions in LoadExtension users 2012-11-21 11:13:55 +11:00
xf86Extensions.h xf86: Re-export extension disable flags 2012-07-16 18:24:49 -07:00
xf86Globals.c xfree86: add autoAddGPU option (v2) 2012-07-06 10:35:20 +01:00
xf86Helper.c xfree86: add xf86UpdateDesktopDimensions() 2012-10-08 12:40:49 +10:00
xf86InPriv.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Init.c xfree86: Change the semantics of driverFunc(GET_REQUIRED_HW_INTERFACES) 2012-09-20 11:07:27 -04:00
xf86Mode.c Make xf86ValidateModes actually copy clock range list to screen pointer 2013-02-05 18:30:37 -08:00
xf86Module.h xf86: bump input ABI version to 19 2013-01-11 14:57:48 +10:00
xf86Opt.h Fix additional gcc -Wwrite-strings warning in xf86 ddx 2012-10-04 13:24:44 +10:00
xf86Option.c Avoid NULL pointer dereference in xf86TokenToOptinfo if token not found 2013-02-05 18:34:26 -08:00
xf86Optionstr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86PM.c xfree86: drop ddx-specific SIGIO blocking 2012-07-03 15:56:35 +10:00
xf86PciInfo.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Priv.h xfree86: Change the semantics of driverFunc(GET_REQUIRED_HW_INTERFACES) 2012-09-20 11:07:27 -04:00
xf86Privstr.h xfree86: add autoAddGPU option (v2) 2012-07-06 10:35:20 +01:00
xf86RandR.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86VGAarbiter.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86VGAarbiter.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86VGAarbiterPriv.h api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86VidMode.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86Xinput.c xfree86: fix mouse wheel support for DGA clients 2012-05-23 16:06:27 +10:00
xf86Xinput.h xfree86: constify InputDriverPtr->driverName and default_options 2012-07-02 22:34:33 -07:00
xf86cmap.c Fix formatting of address operators 2012-12-05 18:09:48 -06:00
xf86cmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86fbBus.c xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86fbman.c Avoid memory leak on realloc failure in localRegisterFreeBoxCallback 2013-02-05 18:34:49 -08:00
xf86fbman.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86noBus.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86pciBus.c xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86pciBus.h xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86platformBus.c Revert "xf86: Fix non-PCI configuration-less setups" 2012-12-12 12:56:46 +10:00
xf86platformBus.h xfree86: add platform bus hotplug support (v3) 2012-07-06 10:35:20 +01:00
xf86sbusBus.c api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
xf86sbusBus.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86str.h xf86: Fix build against recent Linux kernel 2012-10-19 13:12:33 +10:00
xf86vmode.c dix: Pull client-is-local flag up to the ClientRec 2012-09-20 14:36:39 -04:00
xf86xv.c Xv: Remove excessive module-induced indirection 2012-07-09 23:28:37 -07:00
xf86xv.h Move Xv and XvMC from extmod to built-in 2012-07-09 23:28:37 -07:00
xf86xvmc.c Xv: Remove excessive module-induced indirection 2012-07-09 23:28:37 -07:00
xf86xvmc.h Xv: Remove excessive module-induced indirection 2012-07-09 23:28:37 -07:00
xf86xvpriv.h xfree86: fix new warnings introduced in rebase. 2012-06-05 10:33:23 -07:00
xisb.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xisb.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xorgHelper.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xorgVersion.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00