diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/util/configuration.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/util/configuration.c b/src/util/configuration.c index e515c7c46..8553d2b61 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c | |||
@@ -616,7 +616,7 @@ handle_inline (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
616 | { | 616 | { |
617 | fun_ret = GNUNET_OK; | 617 | fun_ret = GNUNET_OK; |
618 | } | 618 | } |
619 | cleanup: | 619 | cleanup: |
620 | cfg->current_nest_level = old_nest_level; | 620 | cfg->current_nest_level = old_nest_level; |
621 | if (NULL != other_cfg) | 621 | if (NULL != other_cfg) |
622 | GNUNET_CONFIGURATION_destroy (other_cfg); | 622 | GNUNET_CONFIGURATION_destroy (other_cfg); |
@@ -890,6 +890,16 @@ GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
890 | { | 890 | { |
891 | size_t i; | 891 | size_t i; |
892 | 892 | ||
893 | if (NULL == section) | ||
894 | { | ||
895 | LOG (GNUNET_ERROR_TYPE_WARNING, | ||
896 | _ ( | ||
897 | "Syntax error while deserializing in line %u (option without section)\n"), | ||
898 | nr); | ||
899 | ret = GNUNET_SYSERR; | ||
900 | break; | ||
901 | } | ||
902 | |||
893 | /* tag = value */ | 903 | /* tag = value */ |
894 | tag = GNUNET_strndup (line, eq - line); | 904 | tag = GNUNET_strndup (line, eq - line); |
895 | /* remove tailing whitespace */ | 905 | /* remove tailing whitespace */ |
@@ -2300,7 +2310,7 @@ GNUNET_CONFIGURATION_load_from (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
2300 | if (fun_ret != GNUNET_OK) | 2310 | if (fun_ret != GNUNET_OK) |
2301 | break; | 2311 | break; |
2302 | } | 2312 | } |
2303 | cleanup: | 2313 | cleanup: |
2304 | if (files_context.files_length > 0) | 2314 | if (files_context.files_length > 0) |
2305 | { | 2315 | { |
2306 | for (size_t i = 0; i < files_context.files_length; i++) | 2316 | for (size_t i = 0; i < files_context.files_length; i++) |