aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2013-04-27 07:03:20 -0700
committerWladimir J. van der Laan <[email protected]>2013-04-27 07:03:20 -0700
commit85157ae0183ca0efd36608b225b5c59ba8885cb9 (patch)
treedc154e96c8ffe2e4805f92f64781f4c9edc411ab /src/util.cpp
parentMerge pull request #2530 from jonasschnelli/mac_win_reopen_fix (diff)
parentPrevent prevent file descriptor leak in ShrinkDebugFile() (diff)
downloaddiscoin-85157ae0183ca0efd36608b225b5c59ba8885cb9.tar.xz
discoin-85157ae0183ca0efd36608b225b5c59ba8885cb9.zip
Merge pull request #2584 from laanwj/2013_04_shrinkdebugfile_leak
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);
}