From 6e34d9b12a2b0515f04e4bd17c2b1e8633647bcc Mon Sep 17 00:00:00 2001 From: Tariq Bashir Date: Sat, 6 Apr 2013 15:24:53 -0700 Subject: [PATCH] Prevent prevent file descriptor leak in ShrinkDebugFile() --- src/util.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util.cpp b/src/util.cpp index 64f8e129831..3fd624c42c6 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1231,6 +1231,8 @@ void ShrinkDebugFile() fclose(file); } } + else if(file != NULL) + fclose(file); }