[CRIU] [PATCH 3/9] cr-dump: move core_entry_free closer to core_entry_alloc

Andrey Vagin avagin at openvz.org
Thu Apr 4 17:44:29 EDT 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-dump.c        | 10 ++++++++++
 include/pstree.h |  2 --
 pstree.c         | 10 ----------
 3 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/cr-dump.c b/cr-dump.c
index c1992fd..fc2bfdb 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -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)
 {
diff --git a/include/pstree.h b/include/pstree.h
index ed6495c..b024c3d 100644
--- a/include/pstree.h
+++ b/include/pstree.h
@@ -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__ */
diff --git a/pstree.c b/pstree.c
index 7663a23..9eebbfb 100644
--- a/pstree.c
+++ b/pstree.c
@@ -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;
-- 
1.7.11.7



More information about the CRIU mailing list