From d872d2bad5151af8be947a27c3e1f53c54d3cb61 Mon Sep 17 00:00:00 2001 From: Juha Sointusalo Date: Sun, 22 Nov 2015 19:51:06 +0200 Subject: [PATCH] lib: fix resource leak --- lib/filesys.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/filesys.cpp b/lib/filesys.cpp index a16c46a051..6535a80433 100644 --- a/lib/filesys.cpp +++ b/lib/filesys.cpp @@ -505,6 +505,7 @@ FILE* boinc_fopen(const char* path, const char* mode) { } if (f) { if (-1 == fcntl(fileno(f), F_SETFD, FD_CLOEXEC)) { + fclose(f); return 0; } }