summaryrefslogtreecommitdiff
path: root/src/mongo/shell/shell_utils_extended.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/shell/shell_utils_extended.cpp')
-rw-r--r--src/mongo/shell/shell_utils_extended.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp
index 1e68882a3bc..2808bab7688 100644
--- a/src/mongo/shell/shell_utils_extended.cpp
+++ b/src/mongo/shell/shell_utils_extended.cpp
@@ -26,6 +26,7 @@
#include "mongo/util/file.h"
#include "mongo/util/md5.hpp"
#include "mongo/util/net/sock.h"
+#include "mongo/util/scopeguard.h"
#include "mongo/util/text.h"
namespace mongo {
@@ -144,6 +145,7 @@ namespace mongo {
stringstream ss;
FILE* f = fopen(e.valuestrsafe(), "rb");
uassert(CANT_OPEN_FILE, "couldn't open file", f );
+ ON_BLOCK_EXIT(fclose, f);
md5digest d;
md5_state_t st;