xserver-multidpi/hw
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
..
dmx Merge remote-tracking branch 'yselkowitz/master' 2012-12-19 12:22:03 -08:00
kdrive Free keymap on error in Xephyr's hostx_load_keymap 2013-02-05 18:30:31 -08:00
vfb vfb: Initialize the GLX extension again. 2012-11-21 11:13:55 +11:00
xfree86 Avoid memory leak on realloc failure in localRegisterFreeBoxCallback 2013-02-05 18:34:49 -08:00
xnest dix: Remove #includes of mibstore.h 2012-09-23 10:31:27 -07:00
xquartz XQuartz: Don't add the 15bit visual any more 2012-12-18 01:37:27 -08:00
xwin Merge remote-tracking branch 'jturney/xserver-next' 2013-01-20 15:58:38 -08:00
Makefile.am Catch errors in recursive relink targets 2010-03-22 00:45:57 -05:00