]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Don't leak FILE objects.
authorBruno Haible <bruno@clisp.org>
Tue, 2 May 2006 12:27:58 +0000 (12:27 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:12 +0000 (12:13 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/msginit.c

index bfc82934a036c9b69f7993acae128b397e4b948c..ba4d412eaab30948fac6a2e0794ac543d08acaad 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-30  Bruno Haible  <bruno@clisp.org>
+
+       * msginit.c (project_id, project_id_version, get_user_email): Close
+       the FILE in case of I/O error.
+
 2006-04-30  Bruno Haible  <bruno@clisp.org>
 
        * write-java.c (msgdomain_write_java): Don't fclose the FILE after
index fac4d550fc6835932ec69333e2e1672351eeaf3e..73d49d5821c7de2df7ed49a6f77569afa1939799 100644 (file)
@@ -800,6 +800,7 @@ project_id ()
   if (linelen == (size_t)(-1))
     {
       error (0, 0, _("%s subprocess I/O error"), prog);
+      fclose (fp);
       goto failed;
     }
   if (linelen > 0 && line[linelen - 1] == '\n')
@@ -867,6 +868,7 @@ project_id_version ()
   if (linelen == (size_t)(-1))
     {
       error (0, 0, _("%s subprocess I/O error"), prog);
+      fclose (fp);
       goto failed;
     }
   if (linelen > 0 && line[linelen - 1] == '\n')
@@ -1025,6 +1027,7 @@ you in case of unexpected technical problems.\n");
   if (linelen == (size_t)(-1))
     {
       error (0, 0, _("%s subprocess I/O error"), prog);
+      fclose (fp);
       goto failed;
     }
   if (linelen > 0 && line[linelen - 1] == '\n')