lxccontainer.c: check lxc_conf before referance haltsignal
If we start container with rcfile(see comments in lxc_start.c), it
is possible that we have no config file in /usr/local/var/lib/lxc.
So when we try lxc_stop, lxc_container_new will not load any config
so we'll get c->lxc_conf = NULL.
In that case, we'll get Segmentation fault in lxcapi_shutdown, a
simple check would fix this.
Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com>
Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
Showing
Please
register
or
sign in
to comment