xserver-multidpi/hw/xfree86/dri2
Justin Dou a73c28f0bd Replace malloc with calloc to initialize the buffers[] as NULL in do_get_buffers function
The calling for allocate_or_reuse_buffer may fail due to some reason, e.g. out of memory.
If the buffers[] were not initialized to be NULL, the following err_out may try to access an illegal memory, which will cause X crash afterward.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Justin Dou <Justin.Dou@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-02-18 12:16:15 -08:00
..
dri2.c Replace malloc with calloc to initialize the buffers[] as NULL in do_get_buffers function 2011-02-18 12:16:15 -08:00
dri2.h DRI2: Don't return junk reply instead of blocking in glXWaitForSbcOML() 2010-06-10 06:43:46 -07:00
dri2ext.c dri2: Only deal with output windows and pixmaps. 2010-06-10 07:20:03 -07:00
Makefile.am Don't reuse PKG_CHECK_MODULES identifiers 2009-01-18 09:49:06 -08:00