Commit f62fd617 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

seize: fix used after free case

*** CID 139496:  Memory - illegal accesses  (USE_AFTER_FREE)
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 8189eda7
...@@ -140,11 +140,10 @@ static int freeze_processes(void) ...@@ -140,11 +140,10 @@ static int freeze_processes(void)
if (ret == 0) if (ret == 0)
continue; continue;
if (seize_catch_task(pid)) { if (seize_catch_task(pid) && state == frozen) {
/* fails when meets a zombie */ /* fails when meets a zombie */
fclose(f); fclose(f);
if (state == frozen) goto err;
goto err;
} }
} }
fclose(f); fclose(f);
......
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