aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-04-27 07:03:20 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-04-27 07:03:20 -0700
commit85157ae0183ca0efd36608b225b5c59ba8885cb9 (patch)
treedc154e96c8ffe2e4805f92f64781f4c9edc411ab
parent63888d43bee33ec2f234894dc52fbd4b4f4710b8 (diff)
parent6e34d9b12a2b0515f04e4bd17c2b1e8633647bcc (diff)
Merge pull request #2584 from laanwj/2013_04_shrinkdebugfile_leak
Prevent prevent file descriptor leak in ShrinkDebugFile()
-rw-r--r--src/util.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 64f8e12983..3fd624c42c 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1231,6 +1231,8 @@ void ShrinkDebugFile()
fclose(file);
}
}
+ else if(file != NULL)
+ fclose(file);
}