gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-47


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-474-g458485f
Date: Thu, 18 Apr 2013 10:40:20 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  458485f79ef850b02d72f54595b0fa429ab95fb7 (commit)
      from  462af4ad3c9788fe8463ee5cfb610fe0e79c28fb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=458485f79ef850b02d72f54595b0fa429ab95fb7


commit 458485f79ef850b02d72f54595b0fa429ab95fb7
Author: Daniele Forsi <address@hidden>
Date:   Thu Apr 18 12:18:47 2013 +0200

    Close file on error paths

diff --git a/testsuite/dump-vcard.c b/testsuite/dump-vcard.c
index 302970d..456e55c 100644
--- a/testsuite/dump-vcard.c
+++ b/testsuite/dump-vcard.c
@@ -35,6 +35,8 @@ int main (int argc, char **argv)
        memset (&entry, 0, sizeof(entry));
        if (gn_vcard2phonebook (f, &entry) < 0) {
                fprintf (stderr, "Parsing '%s' failed\n", argv[1]);
+               if (!is_stdin)
+                       fclose (f);
                return 1;
        }
 
@@ -42,6 +44,7 @@ int main (int argc, char **argv)
                /* Seek back to the beginning and read in memory */
                if (fseek (f, 0, SEEK_SET) < 0) {
                        perror ("Seeking back failed");
+                       fclose (f);
                        return 1;
                }
 
@@ -49,6 +52,7 @@ int main (int argc, char **argv)
                buf = malloc (1024 * 1024);
                if (buf == NULL) {
                        fprintf (stderr, "Couldn't allocate a meg of memory\n");
+                       fclose (f);
                        return 1;
                }
                if (fread (buf, 1024 * 1024, 1, f) < 0) {

-----------------------------------------------------------------------

Summary of changes:
 testsuite/dump-vcard.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]