mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
|
From 45cc0ee874528258d34e21063cf514ccf40a9865 Mon Sep 17 00:00:00 2001
|
||
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||
|
Date: Fri, 12 Jul 2024 13:42:26 +1000
|
||
|
Subject: [PATCH] odbc32: SQLFreeHandle handle ODBC v2 drivers
|
||
|
|
||
|
---
|
||
|
dlls/odbc32/proxyodbc.c | 23 ++++++++++++++++++++++-
|
||
|
1 file changed, 22 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||
|
index 957584af008..9a4f08440ea 100644
|
||
|
--- a/dlls/odbc32/proxyodbc.c
|
||
|
+++ b/dlls/odbc32/proxyodbc.c
|
||
|
@@ -1454,7 +1454,28 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
|
||
|
}
|
||
|
else if (handle->win32_handle)
|
||
|
{
|
||
|
- ret = handle->win32_funcs->SQLFreeHandle( HandleType, handle->win32_handle );
|
||
|
+ if (handle->win32_funcs->SQLFreeHandle)
|
||
|
+ {
|
||
|
+ ret = handle->win32_funcs->SQLFreeHandle( HandleType, handle->win32_handle );
|
||
|
+ }
|
||
|
+ else
|
||
|
+ {
|
||
|
+ /* ODBC v2 */
|
||
|
+ if (HandleType == SQL_HANDLE_DBC)
|
||
|
+ {
|
||
|
+ if (handle->win32_funcs->SQLFreeConnect)
|
||
|
+ ret = handle->win32_funcs->SQLFreeConnect(handle->win32_handle);
|
||
|
+ else
|
||
|
+ ERR("Failed to free connection HANDLE\n");
|
||
|
+ }
|
||
|
+ else if (HandleType == SQL_HANDLE_STMT)
|
||
|
+ {
|
||
|
+ if (handle->win32_funcs->SQLFreeStmt)
|
||
|
+ ret = handle->win32_funcs->SQLFreeStmt(handle->win32_handle, SQL_CLOSE);
|
||
|
+ else
|
||
|
+ ERR("Failed to free statement HANDLE\n");
|
||
|
+ }
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
RegCloseKey( handle->drivers_key );
|
||
|
--
|
||
|
2.43.0
|
||
|
|