Commit 30a7de35 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

cr-dump: move core_entry_free closer to core_entry_alloc

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 5d244ca1
......@@ -584,6 +584,16 @@ static int dump_task_kobj_ids(struct pstree_item *item)
return 0;
}
static void core_entry_free(CoreEntry *core)
{
if (core) {
arch_free_thread_info(core);
xfree(core->thread_core);
xfree(core->tc);
xfree(core->ids);
}
}
static CoreEntry *core_entry_alloc(int alloc_thread_info,
int alloc_tc)
{
......
......@@ -76,6 +76,4 @@ extern struct task_entries *task_entries;
int get_task_ids(struct pstree_item *);
extern struct _TaskKobjIdsEntry *root_ids;
extern void core_entry_free(CoreEntry *core);
#endif /* __CR_PSTREE_H__ */
......@@ -16,16 +16,6 @@
struct pstree_item *root_item;
void core_entry_free(CoreEntry *core)
{
if (core) {
arch_free_thread_info(core);
xfree(core->thread_core);
xfree(core->tc);
xfree(core->ids);
}
}
void free_pstree(struct pstree_item *root_item)
{
struct pstree_item *item = root_item, *parent;
......
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