aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-03-04 16:32:17 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-03-04 16:32:17 +0100
commit411a26dffab450a6df51eff57d6044c650609169 (patch)
treeaa9c824aad30421f43a2a61f715e80eeac6e74e7 /src
parent0e6b1f4a2d6cdbc175c31043e99897247331f27c (diff)
downloadgnunet-411a26dffab450a6df51eff57d6044c650609169.tar.gz
gnunet-411a26dffab450a6df51eff57d6044c650609169.zip
-make coverity happier !coverity
Diffstat (limited to 'src')
-rw-r--r--src/dhtu/plugin_dhtu_gnunet.c1
-rw-r--r--src/fs/fs_uri.c26
-rw-r--r--src/gns/gnunet-bcd.c2
-rw-r--r--src/gnsrecord/gnunet-gnsrecord-tvg.c2
-rw-r--r--src/revocation/gnunet-revocation-tvg.c1
5 files changed, 21 insertions, 11 deletions
diff --git a/src/dhtu/plugin_dhtu_gnunet.c b/src/dhtu/plugin_dhtu_gnunet.c
index fe97f4919..b072be2be 100644
--- a/src/dhtu/plugin_dhtu_gnunet.c
+++ b/src/dhtu/plugin_dhtu_gnunet.c
@@ -626,6 +626,7 @@ libgnunet_plugin_dhtu_gnunet_init (void *cls)
626 (NULL == plugin->nse) ) 626 (NULL == plugin->nse) )
627 { 627 {
628 GNUNET_break (0); 628 GNUNET_break (0);
629 GNUNET_free (api);
629 libgnunet_plugin_dhtu_gnunet_done (plugin); 630 libgnunet_plugin_dhtu_gnunet_done (plugin);
630 return NULL; 631 return NULL;
631 } 632 }
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 73ea5d60d..299dc3159 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -644,7 +644,6 @@ struct GNUNET_FS_Uri *
644GNUNET_FS_uri_parse (const char *uri, char **emsg) 644GNUNET_FS_uri_parse (const char *uri, char **emsg)
645{ 645{
646 struct GNUNET_FS_Uri *ret; 646 struct GNUNET_FS_Uri *ret;
647 char *msg;
648 647
649 if (NULL == uri) 648 if (NULL == uri)
650 { 649 {
@@ -653,18 +652,23 @@ GNUNET_FS_uri_parse (const char *uri, char **emsg)
653 *emsg = GNUNET_strdup (_ ("invalid argument")); 652 *emsg = GNUNET_strdup (_ ("invalid argument"));
654 return NULL; 653 return NULL;
655 } 654 }
656 if (NULL == emsg) 655 /**
657 emsg = &msg; 656 * FIXME: Do we want to log this?
657 */
658 *emsg = NULL; 658 *emsg = NULL;
659 if ((NULL != (ret = uri_chk_parse (uri, emsg))) || 659 if (NULL != (ret = uri_chk_parse (uri, emsg)))
660 (NULL != (ret = uri_ksk_parse (uri, emsg))) || 660 return ret;
661 (NULL != (ret = uri_sks_parse (uri, emsg))) || 661 GNUNET_free (*emsg);
662 (NULL != (ret = uri_loc_parse (uri, emsg)))) 662 if (NULL != (ret = uri_ksk_parse (uri, emsg)))
663 return ret;
664 GNUNET_free (*emsg);
665 if (NULL != (ret = uri_sks_parse (uri, emsg)))
666 return ret;
667 GNUNET_free (*emsg);
668 if (NULL != (ret = uri_loc_parse (uri, emsg)))
663 return ret; 669 return ret;
664 if (NULL == *emsg) 670 GNUNET_free (*emsg);
665 *emsg = GNUNET_strdup (_ ("Unrecognized URI type")); 671 *emsg = GNUNET_strdup (_ ("Unrecognized URI type"));
666 if (emsg == &msg)
667 GNUNET_free (msg);
668 return NULL; 672 return NULL;
669} 673}
670 674
diff --git a/src/gns/gnunet-bcd.c b/src/gns/gnunet-bcd.c
index 83efcfba5..60fe25945 100644
--- a/src/gns/gnunet-bcd.c
+++ b/src/gns/gnunet-bcd.c
@@ -419,6 +419,8 @@ create_response (void *cls,
419 "\\def\\gpglineone{%s}\n\\def\\gpglinetwo{%s}\n", 419 "\\def\\gpglineone{%s}\n\\def\\gpglinetwo{%s}\n",
420 line1, 420 line1,
421 line2); 421 line2);
422 GNUNET_free (line1);
423 GNUNET_free (line2);
422 } 424 }
423 425
424 fprintf (deffile, 426 fprintf (deffile,
diff --git a/src/gnsrecord/gnunet-gnsrecord-tvg.c b/src/gnsrecord/gnunet-gnsrecord-tvg.c
index 91e652a40..87de32066 100644
--- a/src/gnsrecord/gnunet-gnsrecord-tvg.c
+++ b/src/gnsrecord/gnunet-gnsrecord-tvg.c
@@ -152,6 +152,7 @@ run_pkey (struct GNUNET_GNSRECORD_Data *rd, int rd_count, const char *label)
152 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey), 8, 1); 152 sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey), 8, 1);
153 fprintf (stdout, "\n"); 153 fprintf (stdout, "\n");
154 fprintf (stdout, "Zone identifier (ztype|zkey):\n"); 154 fprintf (stdout, "Zone identifier (ztype|zkey):\n");
155 GNUNET_assert (0 < GNUNET_IDENTITY_key_get_length (&id_pub));
155 print_bytes (&id_pub, GNUNET_IDENTITY_key_get_length (&id_pub), 8); 156 print_bytes (&id_pub, GNUNET_IDENTITY_key_get_length (&id_pub), 8);
156 GNUNET_STRINGS_data_to_string (&id_pub, 157 GNUNET_STRINGS_data_to_string (&id_pub,
157 GNUNET_IDENTITY_key_get_length (&id_pub), 158 GNUNET_IDENTITY_key_get_length (&id_pub),
@@ -272,6 +273,7 @@ run_edkey (struct GNUNET_GNSRECORD_Data *rd, int rd_count, const char*label)
272 GNUNET_CRYPTO_EddsaPrivateKey), 8); 273 GNUNET_CRYPTO_EddsaPrivateKey), 8);
273 fprintf (stdout, "\n"); 274 fprintf (stdout, "\n");
274 fprintf (stdout, "Zone identifier (ztype|zkey):\n"); 275 fprintf (stdout, "Zone identifier (ztype|zkey):\n");
276 GNUNET_assert (0 < GNUNET_IDENTITY_key_get_length (&id_pub));
275 print_bytes (&id_pub, GNUNET_IDENTITY_key_get_length (&id_pub), 8); 277 print_bytes (&id_pub, GNUNET_IDENTITY_key_get_length (&id_pub), 8);
276 GNUNET_STRINGS_data_to_string (&id_pub, 278 GNUNET_STRINGS_data_to_string (&id_pub,
277 GNUNET_IDENTITY_key_get_length (&id_pub), 279 GNUNET_IDENTITY_key_get_length (&id_pub),
diff --git a/src/revocation/gnunet-revocation-tvg.c b/src/revocation/gnunet-revocation-tvg.c
index 3ba5b56fa..a34a6bc98 100644
--- a/src/revocation/gnunet-revocation-tvg.c
+++ b/src/revocation/gnunet-revocation-tvg.c
@@ -159,6 +159,7 @@ run (void *cls,
159 print_bytes (pow, 159 print_bytes (pow,
160 GNUNET_REVOCATION_proof_get_size (pow), 160 GNUNET_REVOCATION_proof_get_size (pow),
161 8); 161 8);
162 GNUNET_free (ph);
162} 163}
163 164
164 165