未验证 提交 342b9343 编写于 作者: O openharmony_ci 提交者: Gitee

!645 修改dlclose中的malloc接口,合入monthly分支

Merge pull request !645 from dhy308/cherry-pick-1667465215
......@@ -3390,6 +3390,7 @@ static int dlclose_impl(struct dso *p)
static char* dlclose_deps_black_list[] =
{
"/system/lib/libhidebug.so",
"/system/lib64/libhidebug.so",
"/system/lib64/libmsdp_neardetect_algorithm.z.so",
"/vendor/lib64/libhril_hdf.z.so"
......@@ -3410,7 +3411,7 @@ static int do_dlclose(struct dso *p)
for (deps_num = 0; p->deps[deps_num]; deps_num++);
struct dso **deps_bak = malloc(deps_num*sizeof(struct dso*));
struct dso **deps_bak = internal_malloc(deps_num*sizeof(struct dso*));
if (deps_bak != NULL) {
memcpy(deps_bak, p->deps, deps_num*sizeof(struct dso*));
}
......@@ -3425,7 +3426,9 @@ static int do_dlclose(struct dso *p)
}
}
free(deps_bak);
internal_free(deps_bak);
return 0;
}
hidden int __dlclose(void *p)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册