[CRIU] [PATCH 4/8] dump: Allocate and free ThreadSasEntry
Cyrill Gorcunov
gorcunov at openvz.org
Mon Jun 17 12:47:44 EDT 2013
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
pstree.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/pstree.c b/pstree.c
index 1794a33..2a3af4d 100644
--- a/pstree.c
+++ b/pstree.c
@@ -23,6 +23,7 @@ void core_entry_free(CoreEntry *core)
xfree(core->thread_core);
xfree(core->tc);
xfree(core->ids);
+ xfree(core->sas);
}
}
@@ -30,12 +31,19 @@ CoreEntry *core_entry_alloc(int alloc_thread_info, int alloc_tc)
{
CoreEntry *core;
TaskCoreEntry *tc;
+ ThreadSasEntry *sas;
core = xmalloc(sizeof(*core));
if (!core)
return NULL;
core_entry__init(core);
+ sas = xmalloc(sizeof(*sas));
+ if (!sas)
+ goto err;
+ thread_sas_entry__init(sas);
+ core->sas = sas;
+
core->mtype = CORE_ENTRY__MARCH;
if (alloc_thread_info) {
--
1.8.1.4
More information about the CRIU
mailing list