From: Lennart Poettering Date: Tue, 28 Apr 2020 22:13:52 +0000 (+0200) Subject: tmpfiles: remove unnecessary assert X-Git-Tag: v246-rc1~475^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15628%2Fhead;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index d3b2183cbd0..00e6eb96e99 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -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;