Commit 38c34aae authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

proc_parse: Don't setup ret = 0 early

If we fail in xmalloc the function occasionally return
0 meaning that everything is fine. Don't do that, wait
until routine complete.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 20e8d193
......@@ -759,7 +759,7 @@ static int parse_mountinfo_ent(char *str, struct mount_info *new)
if (ret != 3)
return -1;
ret = 0;
ret = -1;
new->fstype = find_fstype_by_name(fstype);
new->options = xmalloc(strlen(opt) + 1);
......
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