From a514c26337fceb217f902b854222d996486bdb8d Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 15 Jan 2004 11:02:07 +0000 Subject: [PATCH] * src/pshinter/pshalgo.c (psh_glyph_init): Move assignment of `glyph->memory' up to free arrays properly in case of failure. --- ChangeLog | 5 +++++ src/pshinter/pshalgo.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 343bd796b..651f78f34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-01-13 Graham Asher + + * src/pshinter/pshalgo.c (psh_glyph_init): Move assignment of + `glyph->memory' up to free arrays properly in case of failure. + 2004-01-10 Masatake YAMATO Make `FT_Get_CMap_Language_ID' work with CFF. Bug reported by diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c index 4b7a7dcc2..30ad1fbdd 100644 --- a/src/pshinter/pshalgo.c +++ b/src/pshinter/pshalgo.c @@ -2,9 +2,9 @@ /* */ /* pshalgo.c */ /* */ -/* PostScript hinting algorithm 3 (body). */ +/* PostScript hinting algorithm (body). */ /* */ -/* Copyright 2001, 2002, 2003 by */ +/* Copyright 2001, 2002, 2003, 2004 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used */ @@ -1110,7 +1110,7 @@ /* clear all fields */ FT_MEM_ZERO( glyph, sizeof ( *glyph ) ); - memory = globals->memory; + memory = glyph->memory = globals->memory; /* allocate and setup points + contours arrays */ if ( FT_NEW_ARRAY( glyph->points, outline->n_points ) || @@ -1217,7 +1217,6 @@ } } - glyph->memory = memory; glyph->outline = outline; glyph->globals = globals;