chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
condition: properly allow passing back errors from condition checks
[elogind.git]
/
src
/
shared
/
conf-parser.c
diff --git
a/src/shared/conf-parser.c
b/src/shared/conf-parser.c
index cd189adfc3e9813b5af2fa327d761941662736eb..ee6de653e13286220202f067485e2e70cdbeea1c 100644
(file)
--- a/
src/shared/conf-parser.c
+++ b/
src/shared/conf-parser.c
@@
-710,6
+710,7
@@
int config_parse_strv(const char *unit,
if (!utf8_is_valid(n)) {
log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
if (!utf8_is_valid(n)) {
log_invalid_utf8(unit, LOG_ERR, filename, line, EINVAL, rvalue);
+ free(n);
continue;
}
continue;
}
@@
-717,6
+718,9
@@
int config_parse_strv(const char *unit,
if (r < 0)
return log_oom();
}
if (r < 0)
return log_oom();
}
+ if (!isempty(state))
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+ "Trailing garbage, ignoring.");
return 0;
}
return 0;
}