xserver-multidpi/Xext
Alan Coopersmith f4a9332ad1 Handle failure to create counter in init_system_idle_counter
Check for NULL pointer (which can be returned for multiple reasons)
before trying to dereference it to add privates.   To avoid memory leak
in error path, delay malloc of privates until we're ready to add them.

In case we do return NULL up through SyncInitDeviceIdleTime, handle the
possibility of getting NULL passed back down to SyncRemoveDeviceIdleTime.

As reported by parfait 1.1:
Error: Null pointer dereference (CWE 476)
   Read from null pointer 'idle_time_counter'
        at line 2764 of xserver/Xext/sync.c in function 'init_system_idle_counter'.
          Function 'SyncCreateSystemCounter' may return constant 'NULL' at line 952, called at line 2756.
          Null pointer introduced at line 952 in function 'SyncCreateSystemCounter'.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-02-05 18:30:10 -08:00
..
bigreq.c Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
dpms.c Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
dpmsproc.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dpmsstubs.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
geext.c GE: Remove unused RT_GECLIENT 2012-07-10 00:42:10 -07:00
geext.h Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
geint.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
hashtable.c Xext: include dix-config.h 2012-05-24 15:52:38 +10:00
hashtable.h Xext: add a generic hashtable implementation 2012-04-18 12:49:06 +03:00
Makefile.am Xext: Only build one library 2012-07-10 00:01:49 -07:00
panoramiX.c Xext: fix redundant redeclaration warnings 2012-11-05 13:25:07 -06:00
panoramiX.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
panoramiXh.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
panoramiXprocs.c Use C99 designated initializers in Xext Replies 2012-07-09 19:58:30 -07:00
panoramiXsrv.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
panoramiXSwap.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
saver.c Fix formatting of address operators 2012-12-05 18:09:48 -06:00
security.c Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
securitysrv.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
shape.c Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
shm.c Xext: fix shadow warnings 2012-11-05 13:25:08 -06:00
shmint.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
sleepuntil.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
sleepuntil.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
sync.c Handle failure to create counter in init_system_idle_counter 2013-02-05 18:30:10 -08:00
syncsdk.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
syncsrv.h Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
xace.c Xext: fix shadow warnings 2012-11-05 13:25:08 -06:00
xace.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xacestr.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xcmisc.c Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
xf86bigfont.c Xext: fix unused variable warnings in xf86bigfont.c 2012-11-05 13:25:06 -06:00
xf86bigfontsrv.h Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
xres.c Xext: fix redundant redeclaration warnings 2012-11-05 13:25:07 -06:00
xselinux_ext.c Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
xselinux_hooks.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xselinux_label.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xselinux.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xselinuxint.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xtest.c Xext: fix redundant redeclaration warnings 2012-11-05 13:25:07 -06:00
xvdisp.c Use C99 designated initializers in extension Events 2012-07-09 22:52:30 -07:00
xvdisp.h Fix swapped Xv dispatch under Xinerama. 2007-12-02 14:15:36 -05:00
xvdix.h Xv: Remove excessive module-induced indirection 2012-07-09 23:28:37 -07:00
xvmain.c Xv: Remove excessive module-induced indirection 2012-07-09 23:28:37 -07:00
xvmc.c Fix two more C99 initialization mistakes using members of same struct 2012-07-16 21:24:49 -07:00
xvmcext.h Move Xv and XvMC from extmod to built-in 2012-07-09 23:28:37 -07:00