re-use of dbprocess structure (was: Re: [freetds] state of dbrpcsend())
Frediano Ziglio
freddyz77 at tin.it
Thu Jul 8 05:50:58 EDT 2004
Il gio, 2004-07-08 alle 04:31, liam at inodes.org ha scritto:
> On Wed, Jul 07, 2004 at 05:45:45PM +1000, liam at inodes.org wrote:
>
> > ...
> >
> > The process grows without bound at the rate of approximately 1Mbyte/s. Does
> > anyone have any suggestions if I'm doing something wrong with my API use?
>
> As a follow-up to this. I've tried using dbcancel() and even occasionally
> pausing the loop, performing a dbloginfree(), dbexit(), etc and then
> a re-connect but this does not free the used memory.
>
> Running it through dmalloc, I can see that tds_alloc_param_row() is
> called many times in rpc.c but there's no function in dblib.c that
> appears to call tds_free_param_row().
>
> This comment also seems rather suspicious.
>
> rpc.c:325
> erc = tds_submit_rpc(dbproc->tds_socket, ...);
> /* TODO free parameters */
> if (erc == TDS_FAIL) {
> return FAIL;
> }
> }
>
> Unless there are some objections (or offers) I'll start trying to patch
> the apparent numerous memory leaks in 0.62.4.
>
This patch should fix the problem (committed in 0.63, not in 0.62)
freddy77
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vedi.diff.gz
Type: application/x-gzip
Size: 1083 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20040708/5e574ccb/attachment.gz
More information about the FreeTDS
mailing list