Re: Memory leak when using SQLParamData and SQLPutData

From: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
To: Mihai Giurgeanu <mihai(dot)giurgeanu(at)gmail(dot)com>
Cc: pgsql-odbc(at)lists(dot)postgresql(dot)org
Subject: Re: Memory leak when using SQLParamData and SQLPutData
Date: 2017-12-23 00:56:49
Message-ID: 51f80d9a-ee1e-4ec7-8b95-3806a524e5ff@dream.email.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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(at)dream(dot)email(dot)ne(dot)jp
> <mailto:h-inoue(at)dream(dot)email(dot)ne(dot)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
> <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
>

Attachment Content-Type Size
data_at_exec.patch text/plain 503 bytes

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Mihai Giurgeanu 2017-12-23 07:36:46 Re: Memory leak when using SQLParamData and SQLPutData
Previous Message Mihai Giurgeanu 2017-12-21 12:55:07 Re: Memory leak when using SQLParamData and SQLPutData