Allow reusing ntfs_device after close.

edge.strict_endians
uvman 2006-10-18 14:44:23 +00:00
parent 6efbbabba6
commit cc12bccc05
1 changed files with 2 additions and 0 deletions

View File

@ -1113,11 +1113,13 @@ static int ntfs_device_win32_close(struct ntfs_device *dev)
}
rvl = CloseHandle(fd->handle);
free(fd);
fd = NULL;
if (!rvl) {
errno = ntfs_w32error_to_errno(GetLastError());
ntfs_log_trace("CloseHandle() failed.\n");
return -1;
}
NDevClearOpen(dev);
return 0;
}