summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-05-27 21:03:35 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-05-27 21:03:35 +0000
commit7af9e0e4ddef1f677901e167eba618545c4e1b0f (patch)
treec57153718db269f69dd354d947055c7da60a7bf4
parent27c19dc87e04b7fe15a877cd42a7e48d9f7c3f23 (diff)
downloadpango-7af9e0e4ddef1f677901e167eba618545c4e1b0f.tar.gz
Free buffer->positions, clean up error returns that were returning
Thu May 27 16:57:30 2004 Owen Taylor <otaylor@redhat.com> * pango/opentype/otlbuffer.c: Free buffer->positions, clean up error returns that were returning uninitialized values. (#139239, Behdad Esfahbod)
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-1-106
-rw-r--r--ChangeLog.pre-1-66
-rw-r--r--ChangeLog.pre-1-86
-rw-r--r--pango/opentype/otlbuffer.c21
5 files changed, 37 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f8b06c0..07b45852 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu May 27 16:57:30 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/otlbuffer.c: Free buffer->positions,
+ clean up error returns that were returning uninitialized
+ values. (#139239, Behdad Esfahbod)
+
Thu May 27 15:42:20 2004 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontmap.c pango/pangox.c: Add some missing
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 0f8b06c0..07b45852 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,9 @@
+Thu May 27 16:57:30 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/otlbuffer.c: Free buffer->positions,
+ clean up error returns that were returning uninitialized
+ values. (#139239, Behdad Esfahbod)
+
Thu May 27 15:42:20 2004 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontmap.c pango/pangox.c: Add some missing
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 0f8b06c0..07b45852 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,9 @@
+Thu May 27 16:57:30 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/otlbuffer.c: Free buffer->positions,
+ clean up error returns that were returning uninitialized
+ values. (#139239, Behdad Esfahbod)
+
Thu May 27 15:42:20 2004 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontmap.c pango/pangox.c: Add some missing
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 0f8b06c0..07b45852 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,9 @@
+Thu May 27 16:57:30 2004 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/otlbuffer.c: Free buffer->positions,
+ clean up error returns that were returning uninitialized
+ values. (#139239, Behdad Esfahbod)
+
Thu May 27 15:42:20 2004 Owen Taylor <otaylor@redhat.com>
* pango/pangox-fontmap.c pango/pangox.c: Add some missing
diff --git a/pango/opentype/otlbuffer.c b/pango/opentype/otlbuffer.c
index b35a63fb..e9fd03b4 100644
--- a/pango/opentype/otlbuffer.c
+++ b/pango/opentype/otlbuffer.c
@@ -28,12 +28,15 @@
while (size > new_allocated)
new_allocated += (new_allocated >> 1) + 8;
-
- if ( FT_REALLOC_ARRAY( buffer->in_string, buffer->allocated, new_allocated, OTL_GlyphItemRec ) )
+
+ error = FT_REALLOC_ARRAY( buffer->in_string, buffer->allocated, new_allocated, OTL_GlyphItemRec );
+ if ( error )
return error;
- if ( FT_REALLOC_ARRAY( buffer->out_string, buffer->allocated, new_allocated, OTL_GlyphItemRec ) )
+ error = FT_REALLOC_ARRAY( buffer->out_string, buffer->allocated, new_allocated, OTL_GlyphItemRec );
+ if ( error )
return error;
- if ( FT_REALLOC_ARRAY( buffer->positions, buffer->allocated, new_allocated, OTL_PositionRec ) )
+ error = FT_REALLOC_ARRAY( buffer->positions, buffer->allocated, new_allocated, OTL_PositionRec );
+ if ( error )
return error;
buffer->allocated = new_allocated;
@@ -47,8 +50,9 @@
OTL_Buffer *buffer )
{
FT_Error error;
-
- if ( FT_ALLOC( *buffer, sizeof( OTL_BufferRec ) ) )
+
+ error = FT_ALLOC( *buffer, sizeof( OTL_BufferRec ) );
+ if ( error )
return error;
(*buffer)->memory = memory;
@@ -91,6 +95,7 @@
FT_FREE( buffer->in_string );
FT_FREE( buffer->out_string );
+ FT_FREE( buffer->positions );
FT_FREE( buffer );
return FT_Err_Ok;
@@ -117,7 +122,7 @@
OTL_GlyphItem glyph;
error = otl_buffer_ensure( buffer, buffer->in_length + 1 );
- if ( error != FT_Err_Ok )
+ if ( error )
return error;
glyph = &buffer->in_string[buffer->in_length];
@@ -165,7 +170,7 @@
FT_UInt cluster;
error = otl_buffer_ensure( buffer, buffer->out_pos + num_out );
- if ( error != FT_Err_Ok )
+ if ( error )
return error;
properties = buffer->in_string[buffer->in_pos].properties;