From 83751c63e3aad965323ebc05a4f34260bc7f624b Mon Sep 17 00:00:00 2001 From: shaolin Date: Wed, 10 Apr 2013 21:40:08 +0800 Subject: [PATCH] add error handler in dlopen.c --- components/libdl/dlopen.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/libdl/dlopen.c b/components/libdl/dlopen.c index 8271d2fd4..5e063eed9 100644 --- a/components/libdl/dlopen.c +++ b/components/libdl/dlopen.c @@ -35,7 +35,12 @@ void* dlopen(const char *filename, int flags) rt_snprintf(fullpath, strlen(def_path) + strlen(filename) + 2, "%s/%s", def_path, filename); } - + else + { + rt_kprintf("use absolute path\n"); + return RT_NULL; + } + /* find in module list */ module = rt_module_find(fullpath);