]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: fix build failure
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 20 May 2021 06:04:15 +0000 (15:04 +0900)
committerLennart Poettering <lennart@poettering.net>
Thu, 20 May 2021 08:04:14 +0000 (10:04 +0200)
This fixes a conflict between #19555 and #19653.

src/nspawn/nspawn-bind-user.c

index ebf7d4d9176edf0a0af1133296cf39f6bb4ccfd6..801a52b7a8d7dbbc476ef02596fa71169596a66d 100644 (file)
@@ -205,7 +205,6 @@ int bind_user_prepare(
 
         _cleanup_(bind_user_context_freep) BindUserContext *c = NULL;
         uid_t current_uid = MAP_UID_START;
-        size_t n_allocated = 0;
         char **n;
         int r;
 
@@ -282,7 +281,7 @@ int bind_user_prepare(
                 if (r < 0)
                         return r;
 
-                if (!GREEDY_REALLOC(c->data, n_allocated, c->n_data + 1))
+                if (!GREEDY_REALLOC(c->data, c->n_data + 1))
                         return log_oom();
 
                 sm = strdup(u->home_directory);