]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: remove unnecessary assert 15628/head
authorLennart Poettering <lennart@poettering.net>
Tue, 28 Apr 2020 22:13:52 +0000 (00:13 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 28 Apr 2020 22:23:28 +0000 (00:23 +0200)
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

index d3b2183cbd020b45fc6a50fe24a318beef458ac4..00e6eb96e99934ad732f98160e3b2ef51fa051bc 100644 (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;