regedit: Add missing fclose on file import.

This commit is contained in:
Alexander Nicolaysen Sørnes 2008-07-13 14:50:34 +02:00 committed by Alexandre Julliard
parent 4ef4777630
commit d1e02c169d

View file

@ -313,12 +313,18 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME *pofn)
static BOOL import_registry_filename(LPTSTR filename)
{
BOOL Success;
FILE* reg_file = fopen(filename, "r");
if(!reg_file)
return FALSE;
return import_registry_file(reg_file);
Success = import_registry_file(reg_file);
if(fclose(reg_file) != 0)
Success = FALSE;
return Success;
}
static BOOL ImportRegistryFile(HWND hWnd)