Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/msado15/recordset.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index 0b91358f83d..2e684542828 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -92,12 +92,7 @@ static ULONG WINAPI field_Release( Field *iface ) struct field *field = impl_from_Field( iface ); LONG refs = InterlockedDecrement( &field->refs ); TRACE( "%p new refcount %d\n", field, refs ); - if (!refs) - { - TRACE( "destroying %p\n", field ); - heap_free( field->name ); - heap_free( field ); - } + /* Fields aren't destroyed here */ return refs; }
@@ -857,6 +852,7 @@ static ULONG WINAPI recordset_AddRef( _Recordset *iface ) static void close_recordset( struct recordset *recordset ) { ULONG row, col, col_count; + ULONG i;
if ( recordset->row_set ) IRowset_Release( recordset->row_set ); recordset->row_set = NULL; @@ -865,6 +861,13 @@ static void close_recordset( struct recordset *recordset ) col_count = get_column_count( recordset );
recordset->fields->recordset = NULL; + + for (i=0; i < recordset->fields->count; i++) + { + struct field *field = impl_from_Field( recordset->fields->field[i] ); + heap_free( field->name ); + heap_free( field ); + } Fields_Release( &recordset->fields->Fields_iface ); recordset->fields = NULL;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=87177
Your paranoid android.
=== debiant2 (32 bit report) ===
msado15: Unhandled exception: page fault on execute access to 0x00000001 in 32-bit code (0x00000001).
=== debiant2 (32 bit Chinese:China report) ===
msado15: Unhandled exception: page fault on execute access to 0x00000001 in 32-bit code (0x00000001).
=== debiant2 (32 bit WoW report) ===
msado15: Unhandled exception: page fault on execute access to 0x00000001 in 32-bit code (0x00000001).
=== debiant2 (64 bit WoW report) ===
msado15: Unhandled exception: page fault on execute access to 0x00000001 in 32-bit code (0x00000001).