Fix check against LXCROOTFSMOUNT to use strcmp

The check for conf->rootfs.mount not being equal to LXCROOTFSMOUNT
wasn't done with strcmp which was leading to undefined behaviour
and triggered gcc warnings.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Stéphane Graber 2012-11-12 14:39:43 -05:00
parent eeb6cb8305
commit 5bf2c5ce9b

View File

@ -2576,7 +2576,7 @@ void lxc_conf_free(struct lxc_conf *conf)
return;
if (conf->console.path)
free(conf->console.path);
if (conf->rootfs.mount != LXCROOTFSMOUNT)
if (strcmp(conf->rootfs.mount, LXCROOTFSMOUNT) != 0)
free(conf->rootfs.mount);
lxc_clear_config_network(conf);
#if HAVE_APPARMOR