From 56c6c301bcd923372797d6415ff38756705b92d0 Mon Sep 17 00:00:00 2001 From: qiuyiuestc Date: Wed, 24 Nov 2010 01:27:45 +0000 Subject: clean up code git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1106 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- src/object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/object.c') diff --git a/src/object.c b/src/object.c index 34bae8b191..56703d655a 100644 --- a/src/object.c +++ b/src/object.c @@ -257,8 +257,8 @@ rt_object_t rt_object_allocate(enum rt_object_class_type type, const char* name) struct rt_object_information* information; #ifdef RT_USING_MODULE - /* get module object information */ - information = (rt_module_self() != RT_NULL) ? + /* get module object information, module object should be managed by kernel object container */ + information = (rt_module_self() != RT_NULL && (type != RT_Object_Class_Module)) ? &rt_module_self()->module_object[type] : &rt_object_container[type]; #else /* get object information */ -- cgit v1.3.1