[lxc-devel] [PATCH] make sure to check c->lxc_conf is not NULL before dereferencing it.

Serge Hallyn serge.hallyn at ubuntu.com
Mon Nov 4 12:22:24 UTC 2013


Quoting S.Çağlar Onur (caglar at 10ur.org):
> Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/lxccontainer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
> index a9d97ad..362b429 100644
> --- a/src/lxc/lxccontainer.c
> +++ b/src/lxc/lxccontainer.c
> @@ -441,7 +441,7 @@ static bool lxcapi_load_config(struct lxc_container *c, const char *alt_file)
>  
>  static void lxcapi_want_daemonize(struct lxc_container *c)
>  {
> -	if (!c)
> +	if (!c || !c->lxc_conf)
>  		return;
>  	if (container_mem_lock(c)) {
>  		ERROR("Error getting mem lock");
> -- 
> 1.8.3.2
> 
> 
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list