summaryrefslogtreecommitdiff
path: root/ident.c
diff options
context:
space:
mode:
Diffstat (limited to 'ident.c')
-rw-r--r--ident.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ident.c b/ident.c
index bf54483..4121257 100644
--- a/ident.c
+++ b/ident.c
@@ -315,10 +315,9 @@ pcfIdentify(fontFile *f, char **name)
if(i >= nprops)
goto fail;
- s = malloc(strlen(strings + props[i].value) + 1);
+ s = strdup(strings + props[i].value);
if(s == NULL)
goto fail;
- strcpy(s, strings + props[i].value);
*name = s;
free(strings);
free(props);