summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz
diff options
context:
space:
mode:
authorAndreas Kling <andreas.kling@nokia.com>2010-06-22 05:16:45 (GMT)
committerAndreas Kling <andreas.kling@nokia.com>2010-06-22 07:06:08 (GMT)
commit48e9c6de0ed1e3ed630f4105f30934e61c50f5a9 (patch)
tree7bbd23b35eb0e99cbc4016c0a49df85e290d940b /src/3rdparty/harfbuzz
parent77fcfd9231c08975331df14edb1c33c4cea44bea (diff)
downloadQt-48e9c6de0ed1e3ed630f4105f30934e61c50f5a9.zip
Qt-48e9c6de0ed1e3ed630f4105f30934e61c50f5a9.tar.gz
Qt-48e9c6de0ed1e3ed630f4105f30934e61c50f5a9.tar.bz2
Make sure ValueRecord's DeviceTables is cleaned up on failure
Cleanup was a missing for the case where loading an X placement device table failed.
Diffstat (limited to 'src/3rdparty/harfbuzz')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos.c5
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;
}