[Xfce4-commits] [apps/orage] 01/01: 4.11.2.10 Coverity fix 31711 leak of resource not closed file

noreply at xfce.org noreply at xfce.org
Thu Mar 5 11:47:35 CET 2015


This is an automated email from the git hooks/post-receive script.

juha pushed a commit to branch master
in repository apps/orage.

commit 5a61231c1b3db82942e0f67ed556560204776cdd
Author: Juha Kautto <juha at xfce.org>
Date:   Thu Mar 5 12:46:35 2015 +0200

    4.11.2.10 Coverity fix 31711 leak of resource not closed file
    
    Closed file before leaving function
---
 configure.in.in        |    2 +-
 src/tz_zoneinfo_read.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index 562c3b8..1ffee8c 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -9,7 +9,7 @@ dnl Written for Xfce by Juha Kautto <juha at xfce.org>
 dnl
 
 dnl Version information
-m4_define([orage_version], [4.11.2.9-git])
+m4_define([orage_version], [4.11.2.10-git])
 
 m4_define([gtk_minimum_version], [2.14.0])
 m4_define([xfce_minimum_version], [4.8.0])
diff --git a/src/tz_zoneinfo_read.c b/src/tz_zoneinfo_read.c
index 7782011..4802724 100644
--- a/src/tz_zoneinfo_read.c
+++ b/src/tz_zoneinfo_read.c
@@ -649,7 +649,6 @@ static int check_parameters(void)
             /* error reading the parameter file */
             printf("check_parameters: in_file name not found from (%s) \n"
                 , TZ_CONVERT_PAR_FILE_LOC);
-            fclose(par_file);
         }
         else { /* no errors */
             in_file = malloc(par_file_stat.st_size+1);
@@ -659,7 +658,6 @@ static int check_parameters(void)
                         , TZ_CONVERT_PAR_FILE_LOC);
                 free(in_file);
                 in_file = NULL;
-                fclose(par_file);
             }
             else { 
                 /* terminate with nul */
@@ -676,6 +674,7 @@ static int check_parameters(void)
                 }
             }
         }
+        fclose(par_file);
     }
     if (in_file == NULL) /* in file not found */
         in_file = strdup(DEFAULT_OS_ZONEINFO_DIRECTORY);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list