diff options
author | sangwan.kwon <sangwan.kwon@samsung.com> | 2018-04-24 15:15:41 +0900 |
---|---|---|
committer | sangwan.kwon <sangwan.kwon@samsung.com> | 2018-04-24 15:15:41 +0900 |
commit | f94051de7510f1d7e7e29fabd9c36f6fe185bd95 (patch) | |
tree | 1f6e62896d2c5b1a4ea3e0e6310b53a13a6b3131 | |
parent | d5584e0b87e9afe8defa894c713b3ab66737f036 (diff) | |
download | csr-framework-f94051de7510f1d7e7e29fabd9c36f6fe185bd95.tar.gz csr-framework-f94051de7510f1d7e7e29fabd9c36f6fe185bd95.tar.bz2 csr-framework-f94051de7510f1d7e7e29fabd9c36f6fe185bd95.zip |
Fix resource leak on test binarysubmit/tizen/20180424.064628accepted/tizen/unified/20180424.165721
Change-Id: Iba58129c65bbcdd1201158536b99c2f1f5429daf
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
-rw-r--r-- | test/internals/test-file-system.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/internals/test-file-system.cpp b/test/internals/test-file-system.cpp index 4f60297..684b486 100644 --- a/test/internals/test-file-system.cpp +++ b/test/internals/test-file-system.cpp @@ -70,9 +70,9 @@ void __createFile(const std::string &path) return; // already exist int fd = creat(path.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); - BOOST_REQUIRE_MESSAGE(fd > 0, "Failed to create file: " << path); + BOOST_REQUIRE_MESSAGE(fd != -1, "Failed to create file: " << path); - if (fd > 0) + if (fd != -1) ::close(fd); } |