static int feature_add_inst_lib(struct ld_lib_list_el_t ld_lib,
struct lib_list_t **dest, char *hpath)
{
- *dest = new_lib();
- if (*dest == NULL) {
- LOGE("lib alloc error\n");
- return 0;
- };
-
if (!check_exec_path(ld_lib.lib_name)) {
LOGE("bin path parsing error\n");
return 0;
}
+ *dest = new_lib();
+ if (*dest == NULL) {
+ LOGE("lib alloc error\n");
+ return 0;
+ }
(*dest)->lib->bin_path = strdup(ld_lib.lib_name);
if (!feature_add_func_inst_list(ld_lib, (struct data_list_t *)*dest,
hpath)) {
LOGE("funcs parsing error\n");
+ free_lib((*dest));
return 0;
}
(*dest)->size += strlen((*dest)->lib->bin_path) + 1 + sizeof((*dest)->func_num);
(*dest)->hash = calc_lib_hash((*dest)->lib);
return 1;
-
}
static enum lib_md5_check ld_lib_check_md5(struct ld_lib_list_el_t *lib_el)