summaryrefslogtreecommitdiffstats
path: root/winpr/libwinpr/file/test/TestFileFindFirstFile.c
diff options
context:
space:
mode:
Diffstat (limited to 'winpr/libwinpr/file/test/TestFileFindFirstFile.c')
-rw-r--r--winpr/libwinpr/file/test/TestFileFindFirstFile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/winpr/libwinpr/file/test/TestFileFindFirstFile.c b/winpr/libwinpr/file/test/TestFileFindFirstFile.c
index 04829a3..0e5de44 100644
--- a/winpr/libwinpr/file/test/TestFileFindFirstFile.c
+++ b/winpr/libwinpr/file/test/TestFileFindFirstFile.c
@@ -98,7 +98,8 @@ static BOOL find_first_file_success(const char* FilePath)
}
rc = TRUE;
fail:
- FindClose(hFind);
+ if (hFind != INVALID_HANDLE_VALUE)
+ FindClose(hFind);
return rc;
}