From: Serge Hallyn Date: Thu, 12 Dec 2013 18:57:21 +0000 (-0600) Subject: coverity: avoid deref of explicitly NULL variable on error path X-Git-Tag: lxc-1.0.0.beta1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=908fde6aad6ed8063fc1a88cf962ca655b9a3441;p=thirdparty%2Flxc.git coverity: avoid deref of explicitly NULL variable on error path Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 8bc3fe197..820614641 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4008,7 +4008,8 @@ static struct lxc_list *idmap_add_id(struct lxc_conf *conf, uid_t uid) err: ERROR("Out of memory building a new uid map"); - lxc_free_idmap(new); + if (new) + lxc_free_idmap(new); free(new); return NULL; }