diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp
index 33622f8..aeedbf9 100644
--- a/test/log/log_api.cpp
+++ b/test/log/log_api.cpp
@@ -96,6 +96,7 @@ protected:
 		lseek(fd, 0, SEEK_SET);
 		if (read(fd, buf, sizeof(buf)) < 0) {
 			cerr << "Failed to read tmp log file" << endl;
+			close(fd);
 			return TestFail;
 		}
 		close(fd);
