Memory leak in __SQLAllocHandle

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Memory leak in __SQLAllocHandle

xiaonan-2
Hi Nick,

Merry Xmas!
In the line 874 and 1051 of __SQLAllocHandle function(DriverManager/SQLAllocHandle.c), I think the __release_stmt( statement ) should be called, like this:
{
__release_stmt( statement );
*output_handle = SQL_NULL_HSTMT;
}
Else the memory will leak.
Best Regards
Nan Xiao



_______________________________________________
unixODBC-dev mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory leak in __SQLAllocHandle

Nick Gorham-2
On 25/12/14 03:15, xiaonan wrote:
Hi Nick,

Merry Xmas!
In the line 874 and 1051 of __SQLAllocHandle function(DriverManager/SQLAllocHandle.c), I think the __release_stmt( statement ) should be called, like this:
{
__release_stmt( statement );
*output_handle = SQL_NULL_HSTMT;
}
Else the memory will leak.
Best Regards
Nan Xiao

Yes, you are right. I have added the change to the tarball and will check back into sourceforge svn later today.

--
Nick

_______________________________________________
unixODBC-dev mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
Loading...