aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorTariq Bashir <[email protected]>2013-04-06 15:24:53 -0700
committerWladimir J. van der Laan <[email protected]>2013-04-27 16:00:28 +0200
commit6e34d9b12a2b0515f04e4bd17c2b1e8633647bcc (patch)
treedc154e96c8ffe2e4805f92f64781f4c9edc411ab /src/util.cpp
parentMerge pull request #2530 from jonasschnelli/mac_win_reopen_fix (diff)
downloaddiscoin-6e34d9b12a2b0515f04e4bd17c2b1e8633647bcc.tar.xz
discoin-6e34d9b12a2b0515f04e4bd17c2b1e8633647bcc.zip
Prevent prevent file descriptor leak in ShrinkDebugFile()
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 64f8e1298..3fd624c42 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1231,6 +1231,8 @@ void ShrinkDebugFile()
fclose(file);
}
}
+ else if(file != NULL)
+ fclose(file);
}