Re: Memory Leak when freeing statement

From: Kelly Burkhart <kelly(at)tradebotsystems(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Memory Leak when freeing statement
Date: 2005-03-30 20:39:49
Message-ID: 1112215189.3392.70.camel@krb06
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On Wed, 2005-03-30 at 12:06, Peter Eisentraut wrote:
> Kelly Burkhart wrote:
> > I have found a memory leak when freeing a statement handle which has
> > had parameters bound in psqlodbc-08.00.0101. I was able to eliminate
> > the leak by adding:
> >
> > SC_free_params(self, STMT_FREE_PARAMS_ALL);
> >
> > to line 330 of statement.c in the SC_Destructor method. I'm not
> > familiar enough with the code to know if this is a sensible fix.
>
> Can you provide an example program that shows the memory leak?

In the attached program, each query iteration leaks 12 bytes per input
variable. Output variables have no effect.

-K

Attachment Content-Type Size
tst_odbcleak.cpp text/x-c++ 3.5 KB

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Raymond O'Donnell 2005-03-30 20:53:01 Re: [ODBC] delphi access question?
Previous Message Joel Fradkin 2005-03-30 20:15:31 delphi access question?