Commit b2f44b4d by Christian Brauner

lxc_mount_auto_mounts(): free memory on failure

parent 5c218031
...@@ -719,6 +719,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha ...@@ -719,6 +719,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
} }
if (!default_mounts[i].destination) { if (!default_mounts[i].destination) {
ERROR("BUG: auto mounts destination %d was NULL", i); ERROR("BUG: auto mounts destination %d was NULL", i);
free(source);
return -1; return -1;
} }
/* will act like strdup if %r is not present */ /* will act like strdup if %r is not present */
......
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