summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/load-fragment.c8
-rw-r--r--src/core/main.c2
2 files changed, 6 insertions, 4 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);
diff --git a/src/core/main.c b/src/core/main.c
index ea4fd0589d..696372e37c 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1209,7 +1209,7 @@ static int write_container_id(void) {
r = write_string_file("/run/systemd/container", c, WRITE_STRING_FILE_CREATE);
if (r < 0)
- return log_warning_errno(r, "Failed to write /run/systed/container, ignoring: %m");
+ return log_warning_errno(r, "Failed to write /run/systemd/container, ignoring: %m");
return 1;
}