diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-03-04 16:32:17 +0100 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-03-04 16:32:17 +0100 |
commit | 411a26dffab450a6df51eff57d6044c650609169 (patch) | |
tree | aa9c824aad30421f43a2a61f715e80eeac6e74e7 /src/fs | |
parent | 0e6b1f4a2d6cdbc175c31043e99897247331f27c (diff) | |
download | gnunet-411a26dffab450a6df51eff57d6044c650609169.tar.gz gnunet-411a26dffab450a6df51eff57d6044c650609169.zip |
-make coverity happier !coverity
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs_uri.c | 26 |
1 files changed, 15 insertions, 11 deletions
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 * | |||
644 | GNUNET_FS_uri_parse (const char *uri, char **emsg) | 644 | GNUNET_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 | ||