提交 07709625 编写于 作者: R Rich Felker

fix rpath string memory leak on failed dlopen

when dlopen fails, all partially-loaded libraries need to be unmapped
and freed. any of these libraries using an rpath with $ORIGIN
expansion may have an allocated string for the expanded rpath;
previously, this string was not freed when freeing the library data
structures.
上级 2963a9f7
......@@ -1413,6 +1413,8 @@ void *dlopen(const char *file, int mode)
free(p->td_index);
p->td_index = tmp;
}
if (p->rpath != p->rpath_orig)
free(p->rpath);
free(p->deps);
free(p);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册