mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-02 06:43:00 +00:00
pstree: Allocate and free sas entry
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
766d56fb21
commit
1ca1a5b25f
1 changed files with 9 additions and 0 deletions
9
pstree.c
9
pstree.c
|
|
@ -20,6 +20,8 @@ void core_entry_free(CoreEntry *core)
|
|||
{
|
||||
if (core) {
|
||||
arch_free_thread_info(core);
|
||||
if (core->thread_core)
|
||||
xfree(core->thread_core->sas);
|
||||
xfree(core->thread_core);
|
||||
xfree(core->tc);
|
||||
xfree(core->ids);
|
||||
|
|
@ -40,6 +42,7 @@ CoreEntry *core_entry_alloc(int alloc_thread_info, int alloc_tc)
|
|||
|
||||
if (alloc_thread_info) {
|
||||
ThreadCoreEntry *thread_core;
|
||||
ThreadSasEntry *sas;
|
||||
|
||||
if (arch_alloc_thread_info(core))
|
||||
goto err;
|
||||
|
|
@ -49,6 +52,12 @@ CoreEntry *core_entry_alloc(int alloc_thread_info, int alloc_tc)
|
|||
goto err;
|
||||
thread_core_entry__init(thread_core);
|
||||
core->thread_core = thread_core;
|
||||
|
||||
sas = xmalloc(sizeof(*sas));
|
||||
if (!sas)
|
||||
goto err;
|
||||
thread_sas_entry__init(sas);
|
||||
core->thread_core->sas = sas;
|
||||
}
|
||||
|
||||
if (alloc_tc) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue