diff options
author | Andreas Kling <andreas.kling@nokia.com> | 2010-06-22 09:37:34 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-22 12:13:44 +0200 |
commit | 16d8ab747c65024102c0e1415584ace91cc78613 (patch) | |
tree | c27502791dc298be7d641d37a33e3e1b3283620b | |
parent | 009a7e76ad2a96b33a45ca48ee724bbf2de71efa (diff) |
Clean up HB_Anchor's DeviceTables on failure when loading format 3
Signed-off-by: Simon Hausmann <simon.hausmann@nokia.com>
-rw-r--r-- | src/harfbuzz-gpos.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/harfbuzz-gpos.c b/src/harfbuzz-gpos.c index d6f9207..a216005 100644 --- a/src/harfbuzz-gpos.c +++ b/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; } |