summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorChristian Hergert <chergert@redhat.com>2018-07-27 20:43:06 -0700
committerChristian Hergert <chergert@redhat.com>2018-07-27 21:02:21 -0700
commit5c467cdbae02233b04c97ba10a11f124b2d33eba (patch)
tree832b35ec69365433fbccfd4cc65d16eb13095e62 /pango
parent87e713656de19846bede953fed41bd25b25252d9 (diff)
downloadpango-5c467cdbae02233b04c97ba10a11f124b2d33eba.tar.gz
bidi: fix leak of bidi bracket types
This fixes a leak when goto is used to jump past the cleanup of the bracket_types.
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-bidi-type.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/pango-bidi-type.c b/pango/pango-bidi-type.c
index 68f59a97..a49e06d9 100644
--- a/pango/pango-bidi-type.c
+++ b/pango/pango-bidi-type.c
@@ -249,7 +249,6 @@ pango_log2vis_get_embedding_levels (const gchar *text,
max_level = fribidi_get_par_embedding_levels_ex (bidi_types, bracket_types, n_chars,
&fribidi_base_dir,
(FriBidiLevel*)embedding_levels_list);
- g_free (bracket_types);
#else
max_level = fribidi_get_par_embedding_levels (bidi_types, n_chars,
&fribidi_base_dir,
@@ -265,6 +264,10 @@ pango_log2vis_get_embedding_levels (const gchar *text,
resolved:
g_free (bidi_types);
+#ifdef USE_FRIBIDI_EX_API
+ g_free (bracket_types);
+#endif
+
*pbase_dir = (fribidi_base_dir == FRIBIDI_PAR_LTR) ? PANGO_DIRECTION_LTR : PANGO_DIRECTION_RTL;
return embedding_levels_list;