[syslinux] fix non release of the volume handle with NTFS

* Closes #904
This commit is contained in:
Pete Batard 2017-02-17 11:05:49 +00:00
parent 2f81e4f177
commit 136fd7a37e
3 changed files with 12 additions and 9 deletions

View file

@ -146,9 +146,12 @@ DWORD M_NTFSSECT_API NtfsSectGetVolumeInfo(
if (!VolumeName || !VolumeInfo)
return ERROR_INVALID_PARAMETER;
rc = NtfsSectGetVolumeHandle(VolumeName, VolumeInfo);
if (rc != ERROR_SUCCESS)
goto err_handle;
/* Only create a handle if it's not already been set */
if ((VolumeInfo->Handle == NULL) || (VolumeInfo->Handle == INVALID_HANDLE_VALUE)) {
rc = NtfsSectGetVolumeHandle(VolumeName, VolumeInfo);
if (rc != ERROR_SUCCESS)
goto err_handle;
}
rc = NtfsSectLoadXpFuncs(&xp_funcs);
if (rc != ERROR_SUCCESS)