glitch in the license text detected by hyazinthe, thank you!
[oweals/gnunet.git] / src / credential / gnunet-credential.c
index 03f959b95f7306382e5519bdcbab9055a5ad02a3..c0d8b1f52bca624925324ee7ababd82b57fb8ce7 100644 (file)
@@ -2,20 +2,15 @@
      This file is part of GNUnet.
      Copyright (C) 2012-2013 GNUnet e.V.
 
-     GNUnet is free software; you can redistribute it and/or modify
-     it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 3, or (at your
-     option) any later version.
+     GNUnet is free software: you can redistribute it and/or modify it
+     under the terms of the GNU Affero General Public License as published
+     by the Free Software Foundation, either version 3 of the License,
+     or (at your option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     General Public License for more details.
-
-     You should have received a copy of the GNU General Public License
-     along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-     Boston, MA 02110-1301, USA.
+     Affero General Public License for more details.
 */
 /**
  * @file gnunet-credential.c
@@ -371,12 +366,14 @@ run (void *cls,
       fprintf (stderr,
                _("Failed to connect to CREDENTIAL\n"));
       GNUNET_SCHEDULER_shutdown ();
+      return;
     }
     if (NULL == issuer_attr)
     {
       fprintf (stderr,
                _("You must provide issuer the attribute\n"));
       GNUNET_SCHEDULER_shutdown ();
+      return;
     }
 
     if (NULL == ego_name)
@@ -432,6 +429,7 @@ run (void *cls,
                _("Issuer public key `%s' is not well-formed\n"),
                issuer_key);
       GNUNET_SCHEDULER_shutdown ();
+      return;
     }
     credential = GNUNET_CREDENTIAL_connect (cfg);
 
@@ -440,12 +438,14 @@ run (void *cls,
       fprintf (stderr,
                _("Failed to connect to CREDENTIAL\n"));
       GNUNET_SCHEDULER_shutdown ();
+      return;
     }
     if (NULL == issuer_attr || NULL == subject_credential)
     {
       fprintf (stderr,
                _("You must provide issuer and subject attributes\n"));
       GNUNET_SCHEDULER_shutdown ();
+      return;
     }
 
     //Subject credentials are comma separated
@@ -457,6 +457,7 @@ run (void *cls,
                "Invalid subject credentials\n");
       GNUNET_free (tmp);
       GNUNET_SCHEDULER_shutdown ();
+      return;
     }
     int count = 1;
     int i;
@@ -490,6 +491,7 @@ run (void *cls,
     {
       GNUNET_free ((char*)credentials[i].issuer_attribute);
     }
+    GNUNET_free (tmp);
   } else if (GNUNET_YES == create_cred) {
     if (NULL == ego_name)
     {