Commit 1ca1a5b2 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

pstree: Allocate and free sas entry

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 766d56fb
......@@ -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) {
......
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