- ft_new_input_stream: don't make a new copy of the pathname - ft_done_stream: remove the FREE(pathname) call, which wasn't kosher - FT_Open_Face: after calling open_face, don't assume driver is the same as face->driver, use face->driver instead
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 56d96e1..9e7f0b6 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -244,11 +244,7 @@
else if ( args->pathname )
{
error = FT_New_Stream( args->pathname, stream );
- if ( !error )
- {
- if ( !ALLOC( stream->pathname.pointer, strlen(args->pathname)+1 ) )
- strcpy( stream->pathname.pointer, args->pathname );
- }
+ stream->pathname.pointer = args->pathname;
}
/* do we have a custom stream? */
@@ -284,13 +280,10 @@
FT_Stream stream = *astream;
FT_Memory memory = stream->memory;
-
+
if ( stream->close )
stream->close( stream );
-
- if ( stream->pathname.pointer )
- FREE( stream->pathname.pointer );
-
+
FREE( stream );
*astream = 0;
}
@@ -1262,7 +1255,9 @@
goto Fail;
node->data = face;
- FT_List_Add( &driver->faces_list, node );
+ /* don't assume driver is the same as face->driver, so use
+ face->driver instead. (JvR 3/5/2000) */
+ FT_List_Add( &face->driver->faces_list, node );
/* now allocate a glyph slot object for the face */
{