mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-13 08:42:59 +00:00
[hb-subset] Try to fix leak
This commit is contained in:
parent
f09c4d6dd8
commit
fd9903fc4e
2 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue