lib: fix resource leak

This commit is contained in:
Juha Sointusalo 2015-11-22 19:51:06 +02:00
parent 5282b53407
commit d872d2bad5
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}
}