Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
ade7459e
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
2 年多 前同步成功
通知
1
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ade7459e
编写于
8月 06, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[util] Fix leaks
上级
2fef9934
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
6 deletion
+16
-6
src/hb-graphite2.cc
src/hb-graphite2.cc
+14
-4
util/options.cc
util/options.cc
+1
-1
util/options.hh
util/options.hh
+1
-1
未找到文件。
src/hb-graphite2.cc
浏览文件 @
ade7459e
...
...
@@ -102,20 +102,28 @@ static const void *hb_gr_get_table (const void *data, unsigned int tag, size_t *
hb_graphite2_shaper_face_data_t
*
_hb_graphite2_shaper_face_data_create
(
hb_face_t
*
face
)
{
hb_graphite2_shaper_face_data_t
*
data
=
(
hb_graphite2_shaper_face_data_t
*
)
calloc
(
1
,
sizeof
(
hb_graphite2_shaper_face_data_t
));
if
(
unlikely
(
!
data
))
return
NULL
;
hb_blob_t
*
silf_blob
=
hb_face_reference_table
(
face
,
HB_GRAPHITE2_TAG_SILF
);
/* Umm, we just reference the table to check whether it exists.
* Maybe add better API for this? */
if
(
!
hb_blob_get_length
(
silf_blob
))
{
hb_blob_destroy
(
silf_blob
);
return
NULL
;
}
hb_blob_destroy
(
silf_blob
);
hb_graphite2_shaper_face_data_t
*
data
=
(
hb_graphite2_shaper_face_data_t
*
)
calloc
(
1
,
sizeof
(
hb_graphite2_shaper_face_data_t
));
if
(
unlikely
(
!
data
))
hb_blob_destroy
(
silf_blob
);
data
->
face
=
face
;
data
->
grface
=
gr_make_face
(
data
,
&
hb_gr_get_table
,
gr_face_default
);
if
(
unlikely
(
!
data
->
grface
))
{
free
(
data
);
return
NULL
;
}
return
data
;
}
...
...
@@ -225,6 +233,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
features
++
;
}
/* TODO Use scratch buffer for these. */
hb_codepoint_t
*
gids
=
NULL
,
*
pg
;
hb_graphite2_cluster_t
*
clusters
=
NULL
;
gr_segment
*
seg
=
NULL
;
...
...
@@ -323,6 +332,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
success
=
1
;
dieout:
if
(
feats
)
gr_featureval_destroy
(
feats
);
if
(
gids
)
free
(
gids
);
if
(
clusters
)
free
(
clusters
);
if
(
seg
)
gr_seg_destroy
(
seg
);
...
...
util/options.cc
浏览文件 @
ade7459e
...
...
@@ -178,7 +178,7 @@ parse_shapers (const char *name G_GNUC_UNUSED,
GError
**
error
G_GNUC_UNUSED
)
{
shape_options_t
*
shape_opts
=
(
shape_options_t
*
)
data
;
g_
free
(
shape_opts
->
shapers
);
g_
strfreev
(
shape_opts
->
shapers
);
shape_opts
->
shapers
=
g_strsplit
(
arg
,
","
,
0
);
return
true
;
}
...
...
util/options.hh
浏览文件 @
ade7459e
...
...
@@ -155,7 +155,7 @@ struct shape_options_t : option_group_t
~
shape_options_t
(
void
)
{
free
(
features
);
g_
free
(
shapers
);
g_
strfreev
(
shapers
);
}
void
add_options
(
option_parser_t
*
parser
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录