From ec0b4e8a36e29de48fd0d3125ee3ea152dbfcb2f Mon Sep 17 00:00:00 2001 From: "dcamp@mozilla.com" Date: Sat, 23 Jun 2007 23:17:10 -0700 Subject: [PATCH] move file->close() into the if() clause. b=382508, r=luser --- toolkit/airbag/client/crashreporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolkit/airbag/client/crashreporter.cpp b/toolkit/airbag/client/crashreporter.cpp index d9a51f6ede5f..c0853106926c 100644 --- a/toolkit/airbag/client/crashreporter.cpp +++ b/toolkit/airbag/client/crashreporter.cpp @@ -155,9 +155,9 @@ bool ReadStringsFromFile(const string& path, bool success = false; if (f->is_open()) { success = ReadStrings(*f, strings, unescape); + f->close(); } - f->close(); delete f; return success; } @@ -192,9 +192,9 @@ bool WriteStringsToFile(const string& path, bool success = false; if (f->is_open()) { success = WriteStrings(*f, header, strings, escape); + f->close(); } - f->close(); delete f; return success; }