Unverified Commit 4671db7a by Christian Brauner Committed by GitHub

Merge pull request #1930 from lifeng68/Fix_parse_err

Fix lxc_inherit_namespace function error
parents c4e7852b 71649566
......@@ -759,8 +759,8 @@ int lxc_inherit_namespace(const char *lxcname_or_pid, const char *lxcpath,
if (!dup)
return -ENOMEM;
*lastslash = '\0';
pid = lxc_container_name_to_pid(lastslash, dup);
dup[lastslash - lxcname_or_pid] = '\0';
pid = lxc_container_name_to_pid(lastslash + 1, dup);
free(dup);
} else {
pid = lxc_container_name_to_pid(lxcname_or_pid, lxcpath);
......
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