ref: 7eef5364b88b5884310d053a614c10bcc7cf0ded
parent: 59d8ac461597d979b22c3773a3c8eb9ba6cb39d3
author: Just van Rossum <[email protected]>
date: Sun Mar 5 11:07:58 EST 2000
- 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
--- 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 */
{