]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
conf-parser: logs about OOM error
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 10 Sep 2020 05:14:19 +0000 (14:14 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 10 Sep 2020 05:14:19 +0000 (14:14 +0900)
src/shared/conf-parser.c

index f4ef7269a8e7ffe54d71091b0753c37235d1ffe8..90f08252ab0d0cef3d62782e95f46b9da4b1fbcb 100644 (file)
@@ -188,7 +188,7 @@ static int parse_line(
 
                 n = strndup(l+1, k-2);
                 if (!n)
-                        return -ENOMEM;
+                        return log_oom();
 
                 if (sections && !nulstr_contains(sections, n)) {
                         bool ignore = flags & CONFIG_PARSE_RELAXED;