mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
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: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
20e8d193e5
commit
38c34aae5e
@@ -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);
|
||||
|
Reference in New Issue
Block a user