Re: Memory leak when using SQLParamData and SQLPutData - Mailing list pgsql-odbc

From Mihai Giurgeanu
Subject Re: Memory leak when using SQLParamData and SQLPutData
Date
Msg-id 473D1A41-8827-458C-AEDC-070F4CED2A53@gmail.com
Whole thread Raw
In response to Re: Memory leak when using SQLParamData and SQLPutData  ("Inoue, Hiroshi" <h-inoue@dream.email.ne.jp>)
List pgsql-odbc
Hi Hiroshi,

This patch solves the problem.

Thank you,
Mihai


On 23 Dec 2017, at 02:56, Inoue, Hiroshi <h-inoue@dream.email.ne.jp> wrote:

Hi Mihai,

On 2017/12/21 21:55, Mihai Giurgeanu wrote:
Hi Hiroshi,

Thank you for your reply and let me know if I can do anything to help.

Could you try the attached patch?

regards,
Hiroshi Inoue


Thank you,
Mihai


On Dec 21, 2017 2:50 PM, "Inoue, Hiroshi" <h-inoue@dream.email.ne.jp> wrote:
Hi Mihai,


On 2017/12/21 17:26, Mihai Giurgeanu wrote:
Hi,

When executing a prepared insert statement and using SQL_DATA_AT_EXEC parameters that will be sent with SQLParamData and SQLPutData, the driver will leak memory for parameters. The memory will not be deallocated not even the handles are freed and the program disconnects from the database.

I am attaching a small project to demonstrate the bug. You can also browse the project at https://hub.darcs.net/mihaigiurgeanu/psqlodbc-insert-leak

Thanks for the report.
It would take some time to examine the issue because I am very busy now,

regards,
Hiroshi Inoue
<data_at_exec.patch>

pgsql-odbc by date:

Previous
From: "Inoue, Hiroshi"
Date:
Subject: Re: Memory leak when using SQLParamData and SQLPutData
Next
From: "Georgy Pruss"
Date:
Subject: RE: psqlODBC 10.01.0000 Released -- what about 9.6.6?