Re: memory leak in ODBC driver

From: "Scot Loach" <sloach(at)sandvine(dot)com>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: memory leak in ODBC driver
Date: 2004-11-30 02:30:37
Message-ID: DF02F5FE21007A44B8464101EFA761EF255AB1@exchange.sandvine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

I've done some more code inspection and I think my fix is ok.

I'll make the change to my code base and I'll let you know if I have any problems with it.

I've submitted bug #1067 for this.

scot.

-----Original Message-----
From: Dave Page [mailto:dpage(at)vale-housing(dot)co(dot)uk]
Sent: Sat 11/27/2004 6:19 PM
To: Scot Loach; pgsql-odbc(at)postgresql(dot)org
Cc:
Subject: RE: [ODBC] memory leak in ODBC driver

> -----Original Message-----
> From: pgsql-odbc-owner(at)postgresql(dot)org
> [mailto:pgsql-odbc-owner(at)postgresql(dot)org] On Behalf Of Scot Loach
> Sent: 27 November 2004 18:11
> To: pgsql-odbc(at)postgresql(dot)org
> Subject: [ODBC] memory leak in ODBC driver
>
> There is a 16-byte leak for every statement handle that has
> SQLFetch called on it.
> I have tracked this leak down to its source:
> SC_Fetch calls extend_getdata_info, which allocates memory
> for the stmt.getdata_info.
> However, this memory is never freed when the statement is deallocated.
>
> This patch seems to fix the problem - however I don't know
> enough about the internals of the driver to really understand
> if this is the correct or safe fix.
> Can one of the developers help me out here?

It certainly *looks* OK to me, but I share the same concerns as you
(I've never really got that far inside the driver before). Anyone else
care to comment?

Regards, Dave.

Browse pgsql-odbc by date

  From Date Subject
Next Message Venki 2004-11-30 08:28:23 Chinese data is getting saved as ????
Previous Message Dave Page 2004-11-27 23:19:49 Re: memory leak in ODBC driver