Alexandre Julliard : setupapi: Only cleanup fake dlls once the whole section has been executed.
Alexandre Julliard
julliard at winehq.org
Mon Mar 29 09:57:48 CDT 2010
Module: wine
Branch: master
Commit: 6836990e0b1143cad40d6f9cf54d85483e353cf5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6836990e0b1143cad40d6f9cf54d85483e353cf5
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sat Mar 27 11:50:01 2010 +0100
setupapi: Only cleanup fake dlls once the whole section has been executed.
---
dlls/setupapi/fakedll.c | 1 +
dlls/setupapi/install.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/setupapi/fakedll.c b/dlls/setupapi/fakedll.c
index 3b5a47c..ade6754 100644
--- a/dlls/setupapi/fakedll.c
+++ b/dlls/setupapi/fakedll.c
@@ -630,5 +630,6 @@ void cleanup_fake_dlls(void)
HeapFree( GetProcessHeap(), 0, file_buffer );
file_buffer = NULL;
HeapFree( GetProcessHeap(), 0, handled_dlls );
+ handled_dlls = NULL;
handled_count = handled_total = 0;
}
diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c
index cb476af..354f105 100644
--- a/dlls/setupapi/install.c
+++ b/dlls/setupapi/install.c
@@ -713,7 +713,6 @@ static BOOL fake_dlls_callback( HINF hinf, PCWSTR field, void *arg )
HeapFree( GetProcessHeap(), 0, path );
if (!ret) break;
}
- cleanup_fake_dlls();
return ret;
}
@@ -1095,7 +1094,9 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
}
else info.callback = NULL;
- if (!iterate_section_fields( hinf, section, WineFakeDlls, fake_dlls_callback, NULL ))
+ if (iterate_section_fields( hinf, section, WineFakeDlls, fake_dlls_callback, NULL ))
+ cleanup_fake_dlls();
+ else
return FALSE;
if (!iterate_section_fields( hinf, section, RegisterDlls, register_dlls_callback, &info ))
More information about the wine-cvs
mailing list