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

This commit is contained in:
Alexandre Julliard 2010-03-27 11:50:01 +01:00
parent 0ef63e16d6
commit 6836990e0b
2 changed files with 4 additions and 2 deletions

View File

@ -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;
} }

View File

@ -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,
} }
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 ))