Index: third_party/harfbuzz/src/harfbuzz-arabic.c |
diff --git a/third_party/harfbuzz/src/harfbuzz-arabic.c b/third_party/harfbuzz/src/harfbuzz-arabic.c |
index ce2ca6c9611a83030f6d1dce553736f83ac18c32..af40bf80136855564d2a177e914c24606b489005 100644 |
--- a/third_party/harfbuzz/src/harfbuzz-arabic.c |
+++ b/third_party/harfbuzz/src/harfbuzz-arabic.c |
@@ -1112,16 +1112,22 @@ HB_Bool HB_ArabicShape(HB_ShaperItem *item) |
if (HB_SelectScript(item, item->item.script == HB_Script_Arabic ? arabic_features : syriac_features)) { |
HB_Bool ot_ok; |
- if (arabicSyriacOpenTypeShape(item, &ot_ok)) |
+ if (arabicSyriacOpenTypeShape(item, &ot_ok)) { |
+ HB_FREE_STACKARRAY(shapedChars); |
return TRUE; |
- if (ot_ok) |
+ } |
+ if (ot_ok) { |
+ HB_FREE_STACKARRAY(shapedChars); |
return FALSE; |
/* fall through to the non OT code*/ |
+ } |
} |
#endif |
- if (item->item.script != HB_Script_Arabic) |
+ if (item->item.script != HB_Script_Arabic) { |
+ HB_FREE_STACKARRAY(shapedChars); |
return HB_BasicShape(item); |
+ } |
shapedString(item->string, item->stringLength, item->item.pos, item->item.length, shapedChars, &slen, |
item->item.bidiLevel % 2, |