Commit 5bf2c5ce by Stéphane Graber

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: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent eeb6cb83
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment