[unixODBC-dev] iconv leak
nick at lurcher.org
Wed Jan 30 23:08:37 GMT 2013
On 30/01/13 16:10, Todor Buyukliev wrote:
> hi, nick!
> in one of our applications we found leaked structures allocated by iconv_open() from unixODBC. i read the source and the only way i see this could happen is by failure in __connect_part_one(). __connect_part_one() is called by all SQLConnect() variants and no cleanup is done on failure, despite that memory might have been allocated. what's worse is that in this case the connection is left in STATE_C2 and even if SQLDisconnect() is called the memory will not be freed.
> one approach for fixing this is in the attached patch. does it look ok to you? i haven't reproduced the issue and haven't confirmed that the patch doesn't break anything.
> pooling is not enabled in our setup, so i haven't inspected the pooling code.
I have added this fix to the source and built a 2.3.2-pre tarball with
it in on the ftp site.
More information about the unixODBC-dev