From 7eef5364b88b5884310d053a614c10bcc7cf0ded Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Sun, 5 Mar 2000 16:07:58 +0000 Subject: [PATCH] - 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 --- src/base/ftobjs.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 56d96e1ff..9e7f0b60b 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 */ {