re-use of dbprocess structure (was: Re: [freetds] state of dbrpcsend())

liam at liam at
Wed Jul 7 22:31:34 EDT 2004

On Wed, Jul 07, 2004 at 05:45:45PM +1000, liam at 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.

                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.


More information about the FreeTDS mailing list