summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-11-04 12:17:18 +0100
committerDaniel Mack <github@zonque.org>2015-11-04 12:17:18 +0100
commit9fead19d58d79e9ef98f1963fe31cb3c808acba1 (patch)
tree6d89a2f164d81ab9c6ede12d2739d7242c02b39e /src
parentb3d2548baf41c0f5be02ae87dcec644f0b89d840 (diff)
parent0293a7a8302d73806a04ecfe915e1aeeacdefd6f (diff)
Merge pull request #1773 from evverx/dont-hide-enomem
core: small fixes to parse_namespace
Diffstat (limited to 'src')
-rw-r--r--src/core/load-fragment.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index a30cd0967d..5949749374 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -3232,12 +3232,14 @@ int config_parse_namespace_path_strv(
int offset;
r = extract_first_word(&cur, &word, NULL, EXTRACT_QUOTES);
+ if (r == 0)
+ break;
+ if (r == -ENOMEM)
+ return log_oom();
if (r < 0) {
- log_syntax(unit, LOG_ERR, filename, line, 0, "Trailing garbage, ignoring: %s", prev);
+ log_syntax(unit, LOG_ERR, filename, line, r, "Trailing garbage, ignoring: %s", prev);
return 0;
}
- if (r == 0)
- break;
if (!utf8_is_valid(word)) {
log_syntax_invalid_utf8(unit, LOG_ERR, filename, line, word);