[libvirt] [PATCH] lxc: don't try to reference NULL when mounting filesystems

mxs kolo kolomaxes at gmail.com
Mon Aug 22 14:24:19 UTC 2016


>  src/lxc/lxc_container.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
> index e1eb434..5357df4 100644
> --- a/src/lxc/lxc_container.c
> +++ b/src/lxc/lxc_container.c
> @@ -1627,8 +1627,7 @@ static int lxcContainerMountAllFS(virDomainDefPtr
> vmDef,
>          if (lxcContainerResolveSymlinks(vmDef->fss[i], false) < 0)
>              return -1;
>
> -
> -        if (!(vmDef->fss[i]->src &&
> +        if (!(vmDef->fss[i]->src && vmDef->fss[i]->src->path &&
>                STRPREFIX(vmDef->fss[i]->src->path, vmDef->fss[i]->dst)) &&
>              lxcContainerUnmountSubtree(vmDef->fss[i]->dst, false) < 0)
>              return -1;

yes, this second patch fixed problem.

b.r.
 Maxim Kozin




More information about the libvir-list mailing list