aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordvshkurk <Dmitry.V.Shkurko@intel.com>2012-11-21 16:37:20 +0700
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:03:40 -0700
commitd718bf9db5f01ca73d4245fcc90fe6e538f119e0 (patch)
tree3b79a3cf1d1719acf287bc56a07ffd8eca0b23b5
parentc3e26983a72fa51f0dff98bc66234b73f74adc17 (diff)
downloadwrs_omxil_core-d718bf9db5f01ca73d4245fcc90fe6e538f119e0.tar.gz
[PORT FROM MAIN] Non-initialized variable caused SEGV in strdup function
BZ: 69531 The non-initialized dlerr variable from the module_open function was passed to the module_set_error function. Incorrect dlerr caused SEGV in the strdup function called from the module_set_error function. Change-Id: I7e7b0b517a56968e356460dcc7544860ce84fa91 Signed-off-by: dvshkurk <Dmitry.V.Shkurko@intel.com> Reviewed-on: http://android.intel.com:8080/80843 Reviewed-by: Shkurko, Dmitry V <dmitry.v.shkurko@intel.com> Reviewed-by: Ding, Haitao <haitao.ding@intel.com> Tested-by: Ding, Haitao <haitao.ding@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
-rw-r--r--utils/src/module.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/src/module.c b/utils/src/module.c
index c325d97..5f5f49d 100644
--- a/utils/src/module.c
+++ b/utils/src/module.c
@@ -151,6 +151,7 @@ struct module *module_open(const char *file, int flag)
new->handle = dlopen(file, flag);
if (!(new->handle)) {
LOGE("dlopen failed (%s)\n", file);
+ dlerr = dlerror();
module_set_error(dlerr);
pthread_mutex_unlock(&g_lock);
goto free_new;