--- pango/pango/opentype/otlbuffer.c.orig	2004-04-06 19:01:02.360282096 -0400
+++ pango/pango/opentype/otlbuffer.c	2004-04-06 19:08:32.076914776 -0400
@@ -29,11 +29,11 @@
 	while (size > new_allocated)
 	  new_allocated += (new_allocated >> 1) + 8;
 	
-	if ( FT_REALLOC_ARRAY( buffer->in_string, buffer->allocated, new_allocated, OTL_GlyphItemRec ) )
+	if ( ( error = FT_REALLOC_ARRAY( buffer->in_string, buffer->allocated, new_allocated, OTL_GlyphItemRec ) ) )
 	  return error;
-	if ( FT_REALLOC_ARRAY( buffer->out_string, buffer->allocated, new_allocated, OTL_GlyphItemRec ) )
+	if ( ( error = FT_REALLOC_ARRAY( buffer->out_string, buffer->allocated, new_allocated, OTL_GlyphItemRec ) ) )
 	  return error;
-	if ( FT_REALLOC_ARRAY( buffer->positions, buffer->allocated, new_allocated, OTL_PositionRec ) )
+	if ( ( error = FT_REALLOC_ARRAY( buffer->positions, buffer->allocated, new_allocated, OTL_PositionRec ) ) )
 	  return error;
 
 	buffer->allocated = new_allocated;
@@ -48,7 +48,7 @@
   {
     FT_Error error;
     
-    if ( FT_ALLOC( *buffer, sizeof( OTL_BufferRec ) ) )
+    if ( ( error = FT_ALLOC( *buffer, sizeof( OTL_BufferRec ) ) ) )
       return error;
 
     (*buffer)->memory = memory;
@@ -91,6 +91,7 @@
 
     FT_FREE( buffer->in_string );
     FT_FREE( buffer->out_string );
+    FT_FREE( buffer->positions );
     FT_FREE( buffer );
 
     return FT_Err_Ok;
@@ -116,8 +117,7 @@
     FT_Error error;
     OTL_GlyphItem glyph;
     
-    error = otl_buffer_ensure( buffer, buffer->in_length + 1 );
-    if ( error != FT_Err_Ok )
+    if ( ( error = otl_buffer_ensure( buffer, buffer->in_length + 1 ) ) )
       return error;
 
     glyph = &buffer->in_string[buffer->in_length];
@@ -164,8 +164,7 @@
     FT_UInt properties;
     FT_UInt cluster;
 
-    error = otl_buffer_ensure( buffer, buffer->out_pos + num_out );
-    if ( error != FT_Err_Ok )
+    if ( ( error = otl_buffer_ensure( buffer, buffer->out_pos + num_out ) ) )
       return error;
 
     properties = buffer->in_string[buffer->in_pos].properties;

