dump: fix "Defect type: IDENTICAL_BRANCHES"

Static code analysis reported:

 criu/cr-dump.c:2328:2: identical_branches: The same code is executed
 when the condition "ret" is true or false, because the code in the
 if-then branch and after the if statement is identical. Should the if
 statement be removed?

This is a fix for the warning.

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2025-11-26 07:48:02 +00:00 committed by Radostin Stoyanov
parent 2cf8f13ca1
commit bf82389de3

View file

@ -2329,8 +2329,6 @@ int cr_dump_tasks(pid_t pid)
}
ret = write_img_inventory(&he);
if (ret)
goto err;
err:
if (parent_ie)
inventory_entry__free_unpacked(parent_ie, NULL);