mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 06:51:01 +01:00
[hb-subset] Try to fix leak
This commit is contained in:
1 parent
f09c4d6dd8
commit
fd9903fc4e
2 files changed
+8
-4
No files matched your search
@@ -33,12 +33,16 @@ struct face_options_t
|
||||
{
|
||||
~face_options_t ()
|
||||
{
|
||||
g_free (face_loader);
|
||||
g_free (font_file);
|
||||
g_free (face_loader);
|
||||
hb_face_destroy (face);
|
||||
}
|
||||
|
||||
void set_face (hb_face_t *face_)
|
||||
{ face = face_; }
|
||||
{
|
||||
hb_face_destroy (face);
|
||||
face = hb_face_reference (face_);
|
||||
}
|
||||
|
||||
void add_options (option_parser_t *parser);
|
||||
|
||||
@@ -116,7 +120,7 @@ face_options_t::post_parse (GError **error)
|
||||
}
|
||||
}
|
||||
|
||||
face = cache.face;
|
||||
set_face (cache.face);
|
||||
}
|
||||
|
||||
static G_GNUC_NORETURN gboolean
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ struct subset_main_t : option_parser_t, face_options_t, output_options_t<false>
|
||||
main2.option_parser_t::parse (&argc, &args);
|
||||
g_free (args);
|
||||
|
||||
set_face (hb_face_reference (main2.face));
|
||||
set_face (main2.face);
|
||||
}
|
||||
|
||||
void parse (int argc, char **argv)
|
||||
|
||||
Reference in new issue
Block a user