diff options
Diffstat (limited to 'src/fs/fs_uri.c')
-rw-r--r-- | src/fs/fs_uri.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index 73ea5d60d..2d5566b54 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c | |||
@@ -653,18 +653,24 @@ GNUNET_FS_uri_parse (const char *uri, char **emsg) | |||
653 | *emsg = GNUNET_strdup (_ ("invalid argument")); | 653 | *emsg = GNUNET_strdup (_ ("invalid argument")); |
654 | return NULL; | 654 | return NULL; |
655 | } | 655 | } |
656 | if (NULL == emsg) | 656 | /** |
657 | emsg = &msg; | 657 | * FIXME: Do we want to log this? |
658 | *emsg = NULL; | 658 | */ |
659 | if ((NULL != (ret = uri_chk_parse (uri, emsg))) || | 659 | msg = NULL; |
660 | (NULL != (ret = uri_ksk_parse (uri, emsg))) || | 660 | if (NULL != (ret = uri_chk_parse (uri, &msg))) |
661 | (NULL != (ret = uri_sks_parse (uri, emsg))) || | 661 | return ret; |
662 | (NULL != (ret = uri_loc_parse (uri, emsg)))) | 662 | GNUNET_free (msg); |
663 | if (NULL != (ret = uri_ksk_parse (uri, &msg))) | ||
664 | return ret; | ||
665 | GNUNET_free (msg); | ||
666 | if (NULL != (ret = uri_sks_parse (uri, &msg))) | ||
667 | return ret; | ||
668 | GNUNET_free (msg); | ||
669 | if (NULL != (ret = uri_loc_parse (uri, &msg))) | ||
663 | return ret; | 670 | return ret; |
664 | if (NULL == *emsg) | 671 | GNUNET_free (msg); |
672 | if (NULL != emsg) | ||
665 | *emsg = GNUNET_strdup (_ ("Unrecognized URI type")); | 673 | *emsg = GNUNET_strdup (_ ("Unrecognized URI type")); |
666 | if (emsg == &msg) | ||
667 | GNUNET_free (msg); | ||
668 | return NULL; | 674 | return NULL; |
669 | } | 675 | } |
670 | 676 | ||