aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-03-12 20:03:23 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-03-12 20:03:23 +0100
commitb9f890052974ac0e71221a48f32e1af24bf79894 (patch)
tree285d7ad455478f566a2936e3b88bc4a853fae3a8 /src
parentd422d4547a1e99ecdedc3bde146ab3c304bc5c6a (diff)
downloadPROJ-b9f890052974ac0e71221a48f32e1af24bf79894.tar.gz
PROJ-b9f890052974ac0e71221a48f32e1af24bf79894.zip
Fix 'src/cct.c:235,error,resourceLeak,Resource leak: fout' cppcheck warning
Diffstat (limited to 'src')
-rw-r--r--src/cct.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cct.c b/src/cct.c
index 1853a962..96019f2b 100644
--- a/src/cct.c
+++ b/src/cct.c
@@ -232,6 +232,8 @@ int main(int argc, char **argv) {
/* fail if an inverse operation is not available */
if (!proj_pj_info(P).has_inverse) {
fprintf (stderr, "Inverse operation not available\n");
+ if (stdout != fout)
+ fclose (fout);
return 1;
}
/* We have no API call for inverting an operation, so we brute force it. */