Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
853b1eb4
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
853b1eb4
编写于
6月 17, 2001
作者:
B
Ben Laurie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix a memory leak (there's another around here somewhere, though).
PR:
上级
09a2615f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
10 deletion
+29
-10
crypto/engine/engine_list.c
crypto/engine/engine_list.c
+29
-10
未找到文件。
crypto/engine/engine_list.c
浏览文件 @
853b1eb4
...
...
@@ -85,6 +85,7 @@ static ENGINE *engine_list_tail = NULL;
* is needed because the engine list may genuinely become empty during
* use (so we can't use engine_list_head as an indicator for example. */
static
int
engine_list_flag
=
0
;
static
int
ENGINE_free_nolock
(
ENGINE
*
e
);
/* These static functions starting with a lower case "engine_" always
* take place when CRYPTO_LOCK_ENGINE has been locked up. */
...
...
@@ -176,9 +177,7 @@ static int engine_list_remove(ENGINE *e)
engine_list_head
=
e
->
next
;
if
(
engine_list_tail
==
e
)
engine_list_tail
=
e
->
prev
;
/* remove our structural reference. */
e
->
struct_ref
--
;
engine_ref_debug
(
e
,
0
,
-
1
)
ENGINE_free_nolock
(
e
);
return
1
;
}
...
...
@@ -200,13 +199,7 @@ static int engine_internal_check(void)
toret
=
0
;
else
engine_list_flag
=
1
;
#if 0
ENGINE_free(def_engine);
#else
/* We can't ENGINE_free() because the lock's already held */
def_engine
->
struct_ref
--
;
engine_ref_debug
(
def_engine
,
0
,
-
1
)
#endif
ENGINE_free_nolock
(
def_engine
);
return
1
;
}
...
...
@@ -429,6 +422,32 @@ int ENGINE_free(ENGINE *e)
return
1
;
}
static
int
ENGINE_free_nolock
(
ENGINE
*
e
)
{
int
i
;
if
(
e
==
NULL
)
{
ENGINEerr
(
ENGINE_F_ENGINE_FREE
,
ERR_R_PASSED_NULL_PARAMETER
);
return
0
;
}
i
=--
e
->
struct_ref
;
engine_ref_debug
(
e
,
0
,
-
1
)
if
(
i
>
0
)
return
1
;
#ifdef REF_CHECK
if
(
i
<
0
)
{
fprintf
(
stderr
,
"ENGINE_free, bad structural reference count
\n
"
);
abort
();
}
#endif
CRYPTO_free_ex_data
(
engine_ex_data_stack
,
e
,
&
e
->
ex_data
);
OPENSSL_free
(
e
);
return
1
;
}
int
ENGINE_get_ex_new_index
(
long
argl
,
void
*
argp
,
CRYPTO_EX_new
*
new_func
,
CRYPTO_EX_dup
*
dup_func
,
CRYPTO_EX_free
*
free_func
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录