[KERNEL32]
authorPierre Schweitzer <pierre@reactos.org>
Fri, 4 Aug 2017 12:18:52 +0000 (12:18 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Fri, 4 Aug 2017 12:18:52 +0000 (12:18 +0000)
Don't leak a handle when renaming a source file which is a MS mount point or a file without the reparse attribute while we can query its reparse information.

CORE-13635

svn path=/trunk/; revision=75478

reactos/dll/win32/kernel32/client/file/move.c

index 834562a..6ae700e 100644 (file)
@@ -772,6 +772,11 @@ MoveFileWithProgressW(IN LPCWSTR lpExistingFileName,
                 NtClose(SourceHandle);
                 SourceHandle = INVALID_HANDLE_VALUE;
             }
                 NtClose(SourceHandle);
                 SourceHandle = INVALID_HANDLE_VALUE;
             }
+            else
+            {
+                /* Mount point, let's rename it */
+                AttemptReopenWithoutReparse = FALSE;
+            }
         }
 
         /* Simply reopen if required */
         }
 
         /* Simply reopen if required */