dump: don't play with a function exit code
We should not have a chance to exit with a wrong code on error paths.
Now dump_one_task() returs zero, if allocation of dfds failed:
ret = collect_mappings(pid, &vmas);
if (ret) {
pr_err("Collect mappings (pid: %d) failed with %d\n", pid, ret);
goto err;
}
if (!shared_fdtable(item)) {
dfds = xmalloc(sizeof(*dfds));
if (!dfds)
goto err;
...
err:
return -1;
Signed-off-by:
Andrey Vagin <avagin@openvz.org>
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
Showing
Please
register
or
sign in
to comment