summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@yahoo.com>2017-05-21 11:30:07 +0300
committerDaniel Zaoui <daniel.zaoui@yahoo.com>2017-05-21 11:30:07 +0300
commit7d4d03f31381e2fa562caaf78ab109500464ca4a (patch)
tree718ba62f2c1d9d7849a33f2b210fe7f947d6dd95
parentb02dee10174e12f5967160ee502bdf292425399f (diff)
Check dlsym return value before invoking FFIHEADmaster
-rw-r--r--src/lib/eolian_debug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/eolian_debug.c b/src/lib/eolian_debug.c
index 3844d70..ce9eda7 100644
--- a/src/lib/eolian_debug.c
+++ b/src/lib/eolian_debug.c
@@ -224,6 +224,7 @@ _function_invoke(Eo *ptr, const Eolian_Function *foo, Eolian_Function_Type foo_t
224 const char *full_func_name = eolian_function_full_c_name_get(foo, EOLIAN_PROP_GET, EINA_FALSE); 224 const char *full_func_name = eolian_function_full_c_name_get(foo, EOLIAN_PROP_GET, EINA_FALSE);
225 //printf("dlsym %s\n", full_func_name); 225 //printf("dlsym %s\n", full_func_name);
226 void *eo_func = dlsym(RTLD_DEFAULT, full_func_name); 226 void *eo_func = dlsym(RTLD_DEFAULT, full_func_name);
227 if (!eo_func) goto error;
227 ffi_cif cif; 228 ffi_cif cif;
228 if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, ffi_argc, 229 if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, ffi_argc,
229 ffi_ret_type, types) == FFI_OK) 230 ffi_ret_type, types) == FFI_OK)