Hans Leidekker : msado15: Fix NULL pointer dereference in close_recordset.
Alexandre Julliard
julliard at winehq.org
Tue Nov 10 13:46:21 CST 2020
Module: wine
Branch: stable
Commit: 5e05fce75d840ae1207358ba36d232c3ffcec566
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5e05fce75d840ae1207358ba36d232c3ffcec566
Author: Hans Leidekker <hans at codeweavers.com>
Date: Fri May 29 11:30:02 2020 +0200
msado15: Fix NULL pointer dereference in close_recordset.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49281
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit fb1d46fc0a50f0b74c0f7476d224b56a239003fa)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/msado15/recordset.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c
index 1d28d6b957d..52a37cf2187 100644
--- a/dlls/msado15/recordset.c
+++ b/dlls/msado15/recordset.c
@@ -747,7 +747,10 @@ static ULONG WINAPI recordset_AddRef( _Recordset *iface )
static void close_recordset( struct recordset *recordset )
{
- ULONG row, col, col_count = get_column_count( recordset );
+ ULONG row, col, col_count;
+
+ if (!recordset->fields) return;
+ col_count = get_column_count( recordset );
recordset->fields->recordset = NULL;
Fields_Release( &recordset->fields->Fields_iface );
More information about the wine-cvs
mailing list