From b9f890052974ac0e71221a48f32e1af24bf79894 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 12 Mar 2018 20:03:23 +0100 Subject: Fix 'src/cct.c:235,error,resourceLeak,Resource leak: fout' cppcheck warning --- src/cct.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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. */ -- cgit v1.2.3