memory leak in ODBC driver - Mailing list pgsql-odbc

From Scot Loach
Subject memory leak in ODBC driver
Date
Msg-id DF02F5FE21007A44B8464101EFA761EF255AA8@exchange.sandvine.com
Whole thread Raw
List pgsql-odbc
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
understandif this is the correct or safe fix. 
Can one of the developers help me out here?

--- statement.c.old     2004-11-27 13:07:57.000000000 -0500
+++ statement.c 2004-11-27 13:09:37.000000000 -0500
@@ -354,6 +354,8 @@
        if (self->callbacks)
                free(self->callbacks);

+        GDATA_unbind_cols(SC_get_GDTI(self), TRUE);
+
        DELETE_STMT_CS(self);
        free(self);

pgsql-odbc by date:

Previous
From: Amir Zicherman
Date:
Subject: autocommit off
Next
From: "Dave Page"
Date:
Subject: Re: memory leak in ODBC driver