Coverity #769: Fix a potential memory leak for systems that allocate on
malloc(0)
This commit is contained in:
parent
5ef711032b
commit
20c1ef2cc3
|
@ -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>
|
2006-04-06 Adam Jackson <ajax@freedesktop.org>
|
||||||
|
|
||||||
* hw/xfree86/common/xf86Config.c:
|
* hw/xfree86/common/xf86Config.c:
|
||||||
|
|
|
@ -801,7 +801,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
|
||||||
}
|
}
|
||||||
|
|
||||||
buf_size = __glReadPixels_size(format,type,width,height, &ebits, &rowsize);
|
buf_size = __glReadPixels_size(format,type,width,height, &ebits, &rowsize);
|
||||||
if (buf_size >= 0) {
|
if (buf_size > 0) {
|
||||||
buf = (char *) Xalloc( buf_size );
|
buf = (char *) Xalloc( buf_size );
|
||||||
if ( !buf ) {
|
if ( !buf ) {
|
||||||
return( BadAlloc );
|
return( BadAlloc );
|
||||||
|
|
Loading…
Reference in New Issue