summaryrefslogtreecommitdiff
path: root/src/bdf
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2005-11-21 17:32:03 +0000
committerWerner Lemberg <wl@gnu.org>2005-11-21 17:32:03 +0000
commit67ba21189a2b9157d8f2cd250ed38ca141a71244 (patch)
tree28fd2e6e08a681415269f6c6c24cd45242c2249a /src/bdf
parent840232ad2c02becffd37b1d8a446830dd86e38d2 (diff)
* src/bdf/bdfdrivr.c (bdf_interpret_style, BDF_Face_Done): Fix small
memory leak.
Diffstat (limited to 'src/bdf')
-rw-r--r--src/bdf/bdfdrivr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index e14306ef..20f85543 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -248,7 +248,10 @@ THE SOFTWARE.
}
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 @@ THE SOFTWARE.
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 );