Skip to content
Snippets Groups Projects
Commit f53aba8a authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

Fixed error checking in registry saving.

parent 4ff3b205
No related merge requests found
......@@ -195,7 +195,7 @@ static void save_key( HKEY hkey, const char *filename )
handle = FILE_CreateFile( name, GENERIC_WRITE, 0, NULL,
CREATE_NEW, FILE_ATTRIBUTE_NORMAL, -1 );
if (handle != INVALID_HANDLE_VALUE) break;
if ((ret = GetLastError()) != ERROR_FILE_EXISTS) break;
if ((ret = GetLastError()) != ERROR_ALREADY_EXISTS) break;
}
if (handle != INVALID_HANDLE_VALUE)
......@@ -212,6 +212,8 @@ static void save_key( HKEY hkey, const char *filename )
unlink( name );
}
}
else ERR( "Failed to save registry to %s, err %ld\n", name, GetLastError() );
HeapFree( GetProcessHeap(), 0, name );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment