[HarfBuzz] harfbuzz-ng: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Jul 30 07:36:28 PDT 2012


 src/hb-ot-shape.cc |    2 ++
 src/hb-private.hh  |    5 +++++
 2 files changed, 7 insertions(+)

New commits:
commit 3f4764bb56bb7e42ba8859f1905810bd2f998838
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Jul 30 10:06:42 2012 -0400

    Don't lock user_data set during destruction if empty

diff --git a/src/hb-private.hh b/src/hb-private.hh
index ea3254c..2f85025 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -442,6 +442,11 @@ struct hb_lockable_set_t
 
   inline void finish (lock_t &l)
   {
+    if (!items.len) {
+      /* No need for locking. */
+      items.finish ();
+      return;
+    }
     l.lock ();
     while (items.len) {
       item_t old = items[items.len - 1];
commit 4ba647eecf0f70917ac4229af1f2dd3c62fcb7d5
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Jul 30 09:53:06 2012 -0400

    Fix leak

diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index e04e700..7831f90 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -203,6 +203,8 @@ void
 _hb_ot_shaper_shape_plan_data_destroy (hb_ot_shaper_shape_plan_data_t *data)
 {
   data->map.finish ();
+
+  free (data);
 }
 
 



More information about the HarfBuzz mailing list