summaryrefslogtreecommitdiff
path: root/src/fcfreetype.c
diff options
context:
space:
mode:
authorPatrick Lam <plam@MIT.EDU>2006-04-11 14:20:59 +0000
committerPatrick Lam <plam@MIT.EDU>2006-04-11 14:20:59 +0000
commit04f7d3e7fd5069965bc74e678fc51b0412d15aa9 (patch)
tree9e5c852042dc571817a7226f31e658cba2411d06 /src/fcfreetype.c
parentaf2ad236f037c7a53e73b9454f620de1a52f0422 (diff)
Properly convert static charsets to dynamic charsets.
Fix memory leak in error case (Coverity defects #1820, #1821, #1822). Fix memory leak (Coverity defect #1819). prevent crash when invalid include line is parsed (Coverity defect #763). Fix potential null pointer access (Coverity defect #1804). Remove dead code (Coverity defect #1194). Prevent potential null pointer access (Coverity defect #767), ensure error value is read (Coverity defect #1195). reviewed by: plam
Diffstat (limited to 'src/fcfreetype.c')
-rw-r--r--src/fcfreetype.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 2689b9f..5d852a5 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -2744,11 +2744,13 @@ GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags, FT_UShort *scri
FT_Stream stream = face->stream;
FT_Error error;
FT_UShort n, p;
- FT_Memory memory = stream->memory;
+ FT_Memory memory;
if ( !stream )
return TT_Err_Invalid_Face_Handle;
+ memory = stream->memory;
+
if (( error = ftglue_face_goto_table( face, tabletag, stream ) ))
return error;
@@ -2795,7 +2797,7 @@ GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags, FT_UShort *scri
cur_offset = ftglue_stream_pos( stream );
- if ( ftglue_stream_seek( stream, new_offset ) )
+ if (( error = ftglue_stream_seek( stream, new_offset ) ))
goto Fail;
if ( error == TT_Err_Ok )