summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/html/html-layout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index 36995c34..42222bdd 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -1576,7 +1576,12 @@ detect_directionality(fz_context *ctx, fz_pool *pool, fz_html *box)
{
uni_buf buffer = { NULL };
- detect_box_directionality(ctx, pool, &buffer, box);
+ fz_try(ctx)
+ detect_box_directionality(ctx, pool, &buffer, box);
+ fz_always(ctx)
+ fz_free(ctx, buffer.data);
+ fz_catch(ctx)
+ fz_rethrow(ctx);
}
fz_html *