[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-386-ga34afa8

by Werner Koch cvs at cvs.gnupg.org
Wed Apr 16 10:18:12 CEST 2014


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 "The GNU Privacy Guard".

The branch, master has been updated
       via  a34afa8f2053d75f276d6d28dbf1a43db0fd9768 (commit)
      from  db3b528239c9d56bc71fd2283e07a3f1d91e4fd0 (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 -----------------------------------------------------------------
commit a34afa8f2053d75f276d6d28dbf1a43db0fd9768
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Apr 15 16:40:48 2014 +0200

    Two minor code cleanups and one NULL deref on error fix.
    
    * common/estream.c (es_freopen): Remove useless check for STREAM.
    * kbx/keybox-blob.c (_keybox_create_x509_blob): Remove useless check
    for BLOB.
    * tools/sockprox.c (run_proxy): Do not fclose(NULL).
    --
    
    Found by Hans-Christoph Steiner with cppcheck.

diff --git a/common/estream.c b/common/estream.c
index be791a8..6272c81 100644
--- a/common/estream.c
+++ b/common/estream.c
@@ -3101,7 +3101,7 @@ es_freopen (const char *ES__RESTRICT path, const char *ES__RESTRICT mode,
 	}
       else
         {
-          if (stream && path)
+          if (path)
             fname_set_internal (stream, path, 1);
           ESTREAM_UNLOCK (stream);
         }
diff --git a/kbx/keybox-blob.c b/kbx/keybox-blob.c
index a38f991..ebbcdf8 100644
--- a/kbx/keybox-blob.c
+++ b/kbx/keybox-blob.c
@@ -948,12 +948,12 @@ _keybox_create_x509_blob (KEYBOXBLOB *r_blob, ksba_cert_t cert,
  leave:
   release_kid_list (blob->temp_kids);
   blob->temp_kids = NULL;
-  if (blob && names)
+  if (names)
     {
       for (i=0; i < blob->nuids; i++)
         xfree (names[i]);
+      xfree (names);
     }
-  xfree (names);
   if (rc)
     {
       _keybox_release_blob (blob);
diff --git a/tools/sockprox.c b/tools/sockprox.c
index 9ec89ce..3593598 100644
--- a/tools/sockprox.c
+++ b/tools/sockprox.c
@@ -443,7 +443,8 @@ run_proxy (void)
  out:
 
   pthread_attr_destroy (&thread_attr);
-  fclose (protocol_file);	/* FIXME, err checking.  */
+  if (protocol_file)
+    fclose (protocol_file);	/* FIXME, err checking.  */
 
   return err;
 }

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

Summary of changes:
 common/estream.c  |    2 +-
 kbx/keybox-blob.c |    4 ++--
 tools/sockprox.c  |    3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list