Allocations do not need to be on the system heap.
diff --git a/files/dos_fs.c b/files/dos_fs.c
index 671afea..632dcb7 100644
--- a/files/dos_fs.c
+++ b/files/dos_fs.c
@@ -2258,7 +2258,7 @@
if (!(handle = GlobalAlloc16( GMEM_MOVEABLE, sizeof(FIND_FIRST_INFO) )))
return INVALID_HANDLE_VALUE16;
info = (FIND_FIRST_INFO *)GlobalLock16( handle );
- info->path = HEAP_strdupA( SystemHeap, 0, full_name.long_name );
+ info->path = HEAP_strdupA( GetProcessHeap(), 0, full_name.long_name );
info->long_mask = strrchr( info->path, '/' );
if (info->long_mask )
*(info->long_mask++) = '\0';
@@ -2302,7 +2302,7 @@
if (!DOSFS_FindNextEx( info, data ))
{
DOSFS_CloseDir( info->dir ); info->dir = NULL;
- HeapFree( SystemHeap, 0, info->path );
+ HeapFree( GetProcessHeap(), 0, info->path );
info->path = info->long_mask = NULL;
SetLastError( ERROR_NO_MORE_FILES );
return FALSE;
@@ -2324,7 +2324,7 @@
return FALSE;
}
if (info->dir) DOSFS_CloseDir( info->dir );
- if (info->path) HeapFree( SystemHeap, 0, info->path );
+ if (info->path) HeapFree( GetProcessHeap(), 0, info->path );
GlobalUnlock16( handle );
GlobalFree16( handle );
return TRUE;