1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-06 17:18:12 +03:00

Merge pull request #6000 from keszybz/fix-oom-warning

core/load-droping: avoid oom warning when the unit symlink is not a template
This commit is contained in:
Djalal Harouni 2017-05-21 07:11:33 +02:00 committed by GitHub
commit a1f4d73b7c

View File

@ -38,10 +38,12 @@ static bool unit_name_compatible(const char *a, const char *b) {
return true;
r = unit_name_template(a, &prefix);
if (r < 0) {
log_oom();
if (r == -EINVAL)
/* not a template */
return false;
if (r < 0)
/* oom, or some other failure. Just skip the warning. */
return true;
}
/* an instance name points to a target that is just the template name */
if (streq(prefix, b))