1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00

tmpfiles: remove unnecessary assert

if we parse an xattr line that has no valid assignment, we might end up
with an empty ->xattr list. Don't hit assert on that, just go on.

Fixes: #15610
This commit is contained in:
Lennart Poettering 2020-04-29 00:13:52 +02:00
parent d02933fded
commit dfe01841e6

View File

@ -2432,9 +2432,7 @@ static int specifier_expansion_from_arg(Item *i) {
case SET_XATTR:
case RECURSIVE_SET_XATTR:
assert(i->xattrs);
STRV_FOREACH (xattr, i->xattrs) {
STRV_FOREACH(xattr, i->xattrs) {
r = specifier_printf(*xattr, specifier_table, NULL, &resolved);
if (r < 0)
return r;