summaryrefslogtreecommitdiff
path: root/src/module.c
diff options
context:
space:
mode:
authorHyungdeuk Kim <hd3.kim@samsung.com>2013-03-20 18:48:51 +0900
committerHyungdeuk Kim <hd3.kim@samsung.com>2013-03-20 18:48:51 +0900
commit7e2775d1fa8b4fcd59217285a7f18c25f4ee33bd (patch)
tree7ceefb142168640329e765da4dab6c4c5b05c77f /src/module.c
parentec0eaacf200be6e4cf466383b5f0e6ecc396f626 (diff)
downloadui-gadget-1-7e2775d1fa8b4fcd59217285a7f18c25f4ee33bd.tar.gz
ui-gadget-1-7e2775d1fa8b4fcd59217285a7f18c25f4ee33bd.tar.bz2
ui-gadget-1-7e2775d1fa8b4fcd59217285a7f18c25f4ee33bd.zip
add code to remove ui cb under ug_destroy_all case
Diffstat (limited to 'src/module.c')
-rw-r--r--src/module.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/module.c b/src/module.c
index da518d3..2f4915e 100644
--- a/src/module.c
+++ b/src/module.c
@@ -57,7 +57,6 @@ struct ug_module *ug_module_load(const char *name)
int (*module_init) (struct ug_module_ops *ops);
module = calloc(1, sizeof(struct ug_module));
-
if (!module) {
errno = ENOMEM;
return NULL;
@@ -103,6 +102,7 @@ struct ug_module *ug_module_load(const char *name)
goto module_dlclose;
module->handle = handle;
+ module->module_name = strdup(name);
return module;
module_dlclose:
@@ -133,6 +133,9 @@ int ug_module_unload(struct ug_module *module)
module->handle = NULL;
}
+ if(module->module_name)
+ free(module->module_name);
+
free(module);
return 0;
}