From 155980e2e983f1f567227839bc0712b4e3221700 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 22 Jun 2010 09:34:25 +0200 Subject: Clean up HB_Anchor's DeviceTables on failure when loading format 3 --- src/3rdparty/harfbuzz/src/harfbuzz-gpos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c index d6f9207..a216005 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c @@ -637,7 +637,7 @@ static HB_Error Load_Anchor( HB_Anchor* an, if ( FILE_Seek( new_offset ) || ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE], stream ) ) != HB_Err_Ok ) - return error; + goto Fail2; (void)FILE_Seek( cur_offset ); } @@ -695,6 +695,7 @@ Fail: if ( an->af.af3.DeviceTables ) _HB_OPEN_Free_Device( an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] ); +Fail2: FREE( an->af.af3.DeviceTables ); return error; } -- cgit v0.12