From dfe01841e6de975b6d310266813ecf28025ae621 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 29 Apr 2020 00:13:52 +0200 Subject: [PATCH] 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 --- src/tmpfiles/tmpfiles.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; -- 2.47.3