aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTariq Bashir <tariqbashir@gmail.com>2013-04-06 15:24:53 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-04-27 16:00:28 +0200
commit6e34d9b12a2b0515f04e4bd17c2b1e8633647bcc (patch)
treedc154e96c8ffe2e4805f92f64781f4c9edc411ab /src
parent63888d43bee33ec2f234894dc52fbd4b4f4710b8 (diff)
Prevent prevent file descriptor leak in ShrinkDebugFile()
Diffstat (limited to 'src')
-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);
}