Hans Leidekker : msado15: Fix NULL pointer dereference in close_recordset.
Alexandre Julliard
julliard at winehq.org
Fri May 29 15:22:56 CDT 2020
Module: wine
Branch: master
Commit: fb1d46fc0a50f0b74c0f7476d224b56a239003fa
URL: https://source.winehq.org/git/wine.git/?a=commit;h=fb1d46fc0a50f0b74c0f7476d224b56a239003fa
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>
---
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 1f16add4c3..ffb3788531 100644
--- a/dlls/msado15/recordset.c
+++ b/dlls/msado15/recordset.c
@@ -748,7 +748,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