- Don't free an invalid handle. Suggested by Johannes. Test failure remains in the...
[reactos.git] / rostests / winetests / kernel32 / volume.c
index f94d9cb..14c3330 100644 (file)
@@ -427,7 +427,7 @@ static void test_enum_vols(void)
     hFind = pFindFirstVolumeA( Volume_2, MAX_PATH );
     ok(hFind != INVALID_HANDLE_VALUE, "FindFirstVolume failed, err=%u\n",
                 GetLastError());
-
+    if (hFind != INVALID_HANDLE_VALUE) {
     do
     {
         /* validate correct length of unique volume name  */
@@ -440,6 +440,7 @@ static void test_enum_vols(void)
     } while (pFindNextVolumeA( hFind, Volume_2, MAX_PATH ));
     ok(found, "volume name %s not found by Find[First/Next]Volume\n", Volume_1);
     pFindVolumeClose( hFind );
+    }
 }
 
 START_TEST(volume)