Commit 6836990e authored by Alexandre Julliard's avatar Alexandre Julliard

setupapi: Only cleanup fake dlls once the whole section has been executed.

parent 0ef63e16
...@@ -630,5 +630,6 @@ void cleanup_fake_dlls(void) ...@@ -630,5 +630,6 @@ void cleanup_fake_dlls(void)
HeapFree( GetProcessHeap(), 0, file_buffer ); HeapFree( GetProcessHeap(), 0, file_buffer );
file_buffer = NULL; file_buffer = NULL;
HeapFree( GetProcessHeap(), 0, handled_dlls ); HeapFree( GetProcessHeap(), 0, handled_dlls );
handled_dlls = NULL;
handled_count = handled_total = 0; handled_count = handled_total = 0;
} }
...@@ -713,7 +713,6 @@ static BOOL fake_dlls_callback( HINF hinf, PCWSTR field, void *arg ) ...@@ -713,7 +713,6 @@ static BOOL fake_dlls_callback( HINF hinf, PCWSTR field, void *arg )
HeapFree( GetProcessHeap(), 0, path ); HeapFree( GetProcessHeap(), 0, path );
if (!ret) break; if (!ret) break;
} }
cleanup_fake_dlls();
return ret; return ret;
} }
...@@ -1095,7 +1094,9 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section, ...@@ -1095,7 +1094,9 @@ BOOL WINAPI SetupInstallFromInfSectionW( HWND owner, HINF hinf, PCWSTR section,
} }
else info.callback = NULL; 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; return FALSE;
if (!iterate_section_fields( hinf, section, RegisterDlls, register_dlls_callback, &info )) if (!iterate_section_fields( hinf, section, RegisterDlls, register_dlls_callback, &info ))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment