Coverity #769: Fix a potential memory leak for systems that allocate on

malloc(0)
This commit is contained in:
Adam Jackson 2006-04-07 01:50:07 +00:00
parent 5ef711032b
commit 20c1ef2cc3
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-04-06 Adam Jackson <ajax@freedesktop.org>
* hw/dmx/glxProxy/glxsingle.c:
Coverity #769: Fix a potential memory leak for systems that
allocate on malloc(0)
2006-04-06 Adam Jackson <ajax@freedesktop.org>
* hw/xfree86/common/xf86Config.c:

View File

@ -801,7 +801,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
}
buf_size = __glReadPixels_size(format,type,width,height, &ebits, &rowsize);
if (buf_size >= 0) {
if (buf_size > 0) {
buf = (char *) Xalloc( buf_size );
if ( !buf ) {
return( BadAlloc );