nanogui: Re: Memory leak in GrSendClientData


Previous by date: 13 Jun 2005 04:49:03 +0100 Patch: Images with Alpha channel, 8bpp grayscale, skoe.nexgo.de
Next by date: 13 Jun 2005 04:49:03 +0100 Re: Memory leak in GrSendClientData, Alain Volmat
Previous in thread:
Next in thread: 13 Jun 2005 04:49:03 +0100 Re: Memory leak in GrSendClientData, Alain Volmat

Subject: Re: Memory leak in GrSendClientData
From: "Greg Haerr" ####@####.####
Date: 13 Jun 2005 04:49:03 +0100
Message-Id: <2cac01c56fc2$c52b6060$6401a8c0@winXP>

: We exchanged emails about a memory leak problem in GrSenClientData() a 
: while back. I notice there is now renewed activity in the nanox group. I 
: was wondering if this bug made it onto the offical bug list?

No - it didn't.  I rechecked, and nanox/srvfunc.c::GrSendClientData
should just be:

SERVER_LOCK();
GsDeliverClientDataEvent(did, wid, serial, len, thislen, data);
SERVER_UNLOCK();

: >> Plus, I just noticed, in GrSendClient() memory of size 'len' is 
: >> malloc'ed for p>b But, 'thislen' is used for the size of the memcpy. 
: >> Shouldn't the malloc of 'p' be sized to 'thislen'?

I further checked into the thislen vs len parameter: this API
is extremely confusing.  It was contributed, and I didn't check
it carefully.  The nanox/client.c code doesn't even look at the
thislen param.  So user API use of this function must effectively
use len == thislen, FYI.

Alain - can you please post this message to the 0.92 patches
dir?

Regards,

Greg


Previous by date: 13 Jun 2005 04:49:03 +0100 Patch: Images with Alpha channel, 8bpp grayscale, skoe.nexgo.de
Next by date: 13 Jun 2005 04:49:03 +0100 Re: Memory leak in GrSendClientData, Alain Volmat
Previous in thread:
Next in thread: 13 Jun 2005 04:49:03 +0100 Re: Memory leak in GrSendClientData, Alain Volmat


Powered by ezmlm-browse 0.20.