projects
/
platform
/
core
/
connectivity
/
ua-manager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee816d5
)
Fix Svace issue : access memory after free
99/202699/1
accepted/tizen/unified/20190404.021956
submit/tizen/20190403.044801
author
Jihoon Jung
<jh8801.jung@samsung.com>
Wed, 3 Apr 2019 04:32:55 +0000
(13:32 +0900)
committer
Jihoon Jung
<jh8801.jung@samsung.com>
Wed, 3 Apr 2019 04:33:31 +0000
(13:33 +0900)
Change-Id: I7cd057b2b6956161a34d2033878c52e05e1267e3
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
ua-daemon/src/pm/ua-power-plugin-manager.c
patch
|
blob
|
history
diff --git
a/ua-daemon/src/pm/ua-power-plugin-manager.c
b/ua-daemon/src/pm/ua-power-plugin-manager.c
index
d1fd091
..
7b33e96
100644
(file)
--- a/
ua-daemon/src/pm/ua-power-plugin-manager.c
+++ b/
ua-daemon/src/pm/ua-power-plugin-manager.c
@@
-112,12
+112,14
@@
static int __load_power_plugin(const char *path, const char *name, const char *s
UAM_DBG("Loading [%s]", filename);
handle = dlopen(filename, RTLD_NOW);
- g_free(filename);
if (handle == NULL) {
UAM_ERR("Can't load plugin %s: %s", filename, dlerror());
+ g_free(filename);
return UAM_ERROR_INTERNAL;
}
+ g_free(filename);
+
module = (uap_module_t *)dlsym(handle, symbol);
if (module == NULL) {
UAM_ERR("Can't load power plugin module: %s", dlerror());