core: fix segfault in compile_bind_mounts() when BindPaths= or BindReadOnlyPaths= is set

This fixes a bug introduced by 6c47cd7d3b.

Fixes #7055.
This commit is contained in:
Yu Watanabe 2017-10-11 12:27:13 +09:00
parent dcfaecc70a
commit a8cabc612b
1 changed files with 1 additions and 1 deletions

View File

@ -2161,7 +2161,7 @@ static int compile_bind_mounts(
if (!bind_mounts)
return -ENOMEM;
for (i = 0; context->n_bind_mounts; i++) {
for (i = 0; i < context->n_bind_mounts; i++) {
BindMount *item = context->bind_mounts + i;
char *s, *d;