[SETUPLIB] Introduce and use a UnMapAndCloseFile() macro that calls UnMapFile() and NtClose() on handles returned by the OpenAndMapFile() function.

svn path=/branches/setup_improvements/; revision=75651
svn path=/branches/setup_improvements/; revision=75657
This commit is contained in:
Hermès Bélusca-Maïto 2017-08-23 12:20:15 +00:00
parent 29fe31df1b
commit a80f803a2a
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
5 changed files with 18 additions and 12 deletions

View file

@ -373,8 +373,7 @@ Quit:
}
/* Finally, unmap and close the file */
UnMapFile(SectionHandle, ViewBase);
NtClose(UnattendFileHandle);
UnMapAndCloseFile(UnattendFileHandle, SectionHandle, ViewBase);
NtClose(FileHandle);
#endif