summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2021-09-02 22:52:21 -0400
committerAlexei Podtelezhnikov <apodtele@gmail.com>2021-09-02 22:52:21 -0400
commit0a6f0f8fed1e24a7b5f76bd281eac4ce00f3897f (patch)
treedd6f1f3c87e0cc92db505a3c7ea327c5166f9dcf
parenta81cf5aade126184e52ac6a2a9fd36b718b9038c (diff)
downloadfreetype2-0a6f0f8fed1e24a7b5f76bd281eac4ce00f3897f.tar.gz
* src/bdf/bdflib.c (bdf_load_font): Remove memory shuffling.
-rw-r--r--src/bdf/bdflib.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index e5002bc25..372739aa1 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -2164,27 +2164,25 @@
FT_LOCAL_DEF( FT_Error )
bdf_load_font( FT_Stream stream,
- FT_Memory extmemory,
+ FT_Memory memory,
bdf_options_t* opts,
bdf_font_t* *font )
{
unsigned long lineno = 0; /* make compiler happy */
_bdf_parse_t *p = NULL;
- FT_Memory memory = extmemory; /* needed for FT_NEW */
FT_Error error = FT_Err_Ok;
if ( FT_NEW( p ) )
goto Exit;
- memory = NULL;
p->opts = (bdf_options_t*)( ( opts != 0 ) ? opts : &_bdf_opts );
p->minlb = 32767;
p->size = stream->size;
- p->memory = extmemory; /* only during font creation */
+ p->memory = memory; /* only during font creation */
- _bdf_list_init( &p->list, extmemory );
+ _bdf_list_init( &p->list, memory );
error = _bdf_readstream( stream, _bdf_parse_start,
(void *)p, &lineno );
@@ -2275,8 +2273,6 @@
if ( p->font != 0 )
{
/* Make sure the comments are NULL terminated if they exist. */
- memory = p->font->memory;
-
if ( p->font->comments_len > 0 )
{
if ( FT_QRENEW_ARRAY( p->font->comments,
@@ -2297,8 +2293,6 @@
{
_bdf_list_done( &p->list );
- memory = extmemory;
-
FT_FREE( p->glyph_name );
FT_FREE( p );
}
@@ -2308,8 +2302,6 @@
Fail:
bdf_free_font( p->font );
- memory = extmemory;
-
FT_FREE( p->font );
goto Exit;