diff options
author | Adam Jackson <ajax@nwnk.net> | 2006-04-07 01:50:07 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2006-04-07 01:50:07 +0000 |
commit | 20c1ef2cc30abe45eeaf5b0833cbc0095ed05c02 (patch) | |
tree | 9fd2228bb9570790ff23e3fae85cfb3f23d721ee /hw/dmx | |
parent | 5ef711032b821be82fd7281fe64872bcbaff0327 (diff) |
Coverity #769: Fix a potential memory leak for systems that allocate on
malloc(0)
Diffstat (limited to 'hw/dmx')
-rw-r--r-- | hw/dmx/glxProxy/glxsingle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c index 5a8f72736..e353263a7 100644 --- a/hw/dmx/glxProxy/glxsingle.c +++ b/hw/dmx/glxProxy/glxsingle.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 ); |