[PATCH] Replace malloc with calloc to initialize the buffers[] as NULL in do_get_buffers function

Keith Packard keithp at keithp.com
Fri Feb 18 12:17:09 PST 2011


On Thu, 10 Feb 2011 16:27:29 -0500, Kristian Høgsberg <krh at bitplanet.net> wrote:

> 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.

Merged.
   0bc9b15..a73c28f  master -> master

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20110218/33a429c4/attachment.pgp>


More information about the xorg mailing list