Bug 31992 - Resource leak in tibetan_shape_syllable
Summary: Resource leak in tibetan_shape_syllable
Status: RESOLVED FIXED
Alias: None
Product: HarfBuzz
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Behdad Esfahbod
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-30 02:14 UTC by Juuso Pakarinen
Modified: 2012-07-30 14:51 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Juuso Pakarinen 2010-11-30 02:14:13 UTC
Code analyser tool runned against QT including HarfBuzz reveiled resource leak in tibetan_shape_syllable.
Fix proposal:

diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c b/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c
index bfa31b1..4b2e8f8 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c
@@ -113,6 +113,7 @@ static HB_Bool tibetan_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_
 
     if (item->num_glyphs < item->item.length + 4) {
         item->num_glyphs = item->item.length + 4;
+        HB_FREE_STACKARRAY(reordered);
         return FALSE;
     }


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.