From cc12bccc05ce212222e2b23fe6ccb746273bb89d Mon Sep 17 00:00:00 2001 From: uvman Date: Wed, 18 Oct 2006 14:44:23 +0000 Subject: [PATCH] Allow reusing ntfs_device after close. --- libntfs/win32_io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libntfs/win32_io.c b/libntfs/win32_io.c index c7a3e8e8..5cfcbec9 100644 --- a/libntfs/win32_io.c +++ b/libntfs/win32_io.c @@ -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; }