Fix a cut & paste error.
[reactos.git] / reactos / lib / kernel32 / file / volume.c
index 7ae9db1..905202f 100644 (file)
@@ -991,11 +991,12 @@ GetVolumeNameForVolumeMountPointW(
             }
             else
             {
-               RtlFreeHeap(GetProcessHeap(), 0, MountPoints);
                SetLastError(ERROR_FILENAME_EXCED_RANGE);
                Result = FALSE;
             }
 
+            RtlFreeHeap(GetProcessHeap(), 0, MountPoints);
+
             return Result;
          }
       }