* src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).

(_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
contents.
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index d1d1704..7b40f42 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1790,6 +1790,9 @@
           glyph           = font->unencoded + font->unencoded_used;
           glyph->name     = p->glyph_name;
           glyph->encoding = (long)font->unencoded_used++;
+
+          /* Reset the initial glyph info. */
+          p->glyph_name = NULL;
         }
         else
         {
@@ -2589,6 +2592,7 @@
 
       memory = extmemory;
 
+      FT_FREE( p->glyph_name );
       FT_FREE( p );
     }
 
@@ -2600,7 +2604,6 @@
     memory = extmemory;
 
     FT_FREE( p->font );
-    FT_FREE( p->glyph_name );
 
     goto Exit;
   }