File: TXFMOutputFile-close-output-file-only-if-it-s-open.patch

package info (click to toggle)
xml-security-c 1.7.3-4%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,096 kB
  • sloc: cpp: 47,259; sh: 4,123; makefile: 503
file content (25 lines) | stat: -rw-r--r-- 693 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu>
Date: Sat, 30 Jan 2016 23:40:38 +0100
Subject: TXFMOutputFile: close output file only if it's open

---
 xsec/transformers/TXFMOutputFile.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xsec/transformers/TXFMOutputFile.cpp b/xsec/transformers/TXFMOutputFile.cpp
index 04542bd..f0c8681 100644
--- a/xsec/transformers/TXFMOutputFile.cpp
+++ b/xsec/transformers/TXFMOutputFile.cpp
@@ -36,10 +36,10 @@ XERCES_CPP_NAMESPACE_USE
 
 TXFMOutputFile::~TXFMOutputFile() {
 
-    if (f.is_open())
+    if (f.is_open()) {
         f.write("\n----- END -----\n", 17);
 	f.close();
-
+    }
 }
 
 // Methods to set the inputs