diff options
author | Andreas Kling <andreas.kling@nokia.com> | 2010-06-22 07:09:32 (GMT) |
---|---|---|
committer | Andreas Kling <andreas.kling@nokia.com> | 2010-06-22 07:09:32 (GMT) |
commit | da024f96bf0969cd0de85389e621a14c3381add8 (patch) | |
tree | e0d1e028a97870c78c26d54c9f4ec6e4db623a27 /src/3rdparty | |
parent | e6f156d9172a21236950885ff94b9838cfb58912 (diff) | |
download | Qt-da024f96bf0969cd0de85389e621a14c3381add8.zip Qt-da024f96bf0969cd0de85389e621a14c3381add8.tar.gz Qt-da024f96bf0969cd0de85389e621a14c3381add8.tar.bz2 |
Make sure ValueRecord's DeviceTables are cleaned up on failure
Cleanup was a missing for the case where loading an X placement
device table failed.
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-gpos.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c index 0236271..d6f9207 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c @@ -273,7 +273,7 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr, if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE ) { if ( ACCESS_Frame( 2L ) ) - return error; + goto Fail4; new_offset = GET_UShort(); @@ -287,7 +287,7 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr, if ( FILE_Seek( new_offset ) || ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_X_PLACEMENT_DEVICE], stream ) ) != HB_Err_Ok ) - return error; + goto Fail4; (void)FILE_Seek( cur_offset ); } } @@ -444,6 +444,7 @@ Fail3: if ( vr->DeviceTables ) _HB_OPEN_Free_Device( vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] ); +Fail4: FREE( vr->DeviceTables ); return error; } |