2
0
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:
Cyrill Gorcunov
2013-12-03 22:49:30 +04:00
committed by Pavel Emelyanov
parent 20e8d193e5
commit 38c34aae5e

View File

@@ -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);