Commit 20c1ef2c authored by Adam Jackson's avatar Adam Jackson 🎧

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

    malloc(0)
parent 5ef71103
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:
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment