ref: 67ba21189a2b9157d8f2cd250ed38ca141a71244
parent: 840232ad2c02becffd37b1d8a446830dd86e38d2
author: Werner Lemberg <[email protected]>
date: Mon Nov 21 12:32:03 EST 2005
* src/bdf/bdfdrivr.c (bdf_interpret_style, BDF_Face_Done): Fix small memory leak.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-21 H�vard Wall <[email protected]>
+
+ * src/bdf/bdfdrivr.c (bdf_interpret_style, BDF_Face_Done): Fix small
+ memory leak.
+
2005-11-21 Werner Lemberg <[email protected]>
* src/sfnt/ttload.c (sfnt_init): Add tracing message.
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -248,7 +248,10 @@
}
if ( !parts || !len )
- face->style_name = (char *)"Regular";
+ {
+ FT_ALLOC( face->style_name, ft_strlen( "Regular" ) + 1 );
+ ft_strcpy( face->style_name, "Regular" );
+ }
else
{
char *style, *s;
@@ -311,6 +314,7 @@
FT_FREE( face->charset_encoding );
FT_FREE( face->charset_registry );
FT_FREE( bdfface->family_name );
+ FT_FREE( bdfface->style_name );
FT_FREE( bdfface->available_sizes );