aboutsummaryrefslogtreecommitdiff
path: root/mkfontscale/mkfontscale.c
diff options
context:
space:
mode:
Diffstat (limited to 'mkfontscale/mkfontscale.c')
-rw-r--r--mkfontscale/mkfontscale.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mkfontscale/mkfontscale.c b/mkfontscale/mkfontscale.c
index 01e982bf0..e605cf9bd 100644
--- a/mkfontscale/mkfontscale.c
+++ b/mkfontscale/mkfontscale.c
@@ -20,6 +20,8 @@
THE SOFTWARE.
*/
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -898,10 +900,9 @@ doDirectory(const char *dirname_given, int numEncodings, ListPtr encodingsToDo)
BDF_PropertyRec prop;
rc = FT_Get_BDF_Property(face, "FONT", &prop);
if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_ATOM) {
- xlfd_name = malloc(strlen(prop.u.atom) + 1);
+ xlfd_name = strdup(prop.u.atom);
if(xlfd_name == NULL)
goto done;
- strcpy(xlfd_name, prop.u.atom);
}
}
}