openlink / iODBC

An open-source ODBC driver manager and SDK that facilitates the development of database-independent applications on linux, freebsd, unix and MacOS X platforms.
http://www.iodbc.org/
Other
157 stars 53 forks source link

Memory leak if too many diagnostics are returned #71

Closed matthew-wozniczka closed 2 years ago

matthew-wozniczka commented 2 years ago

I haven't confirmed this, but I was looking through the code, and it looks like https://github.com/openlink/iODBC/blob/79c7f572a7b5c4123ec3cc1dd29df1af61a3405f/iodbc/herr.c#L154 will leak memory, as it overwrites perr->msg without freeing the previous value.

TallTed commented 2 years ago

Interesting. We'll have a look.