summaryrefslogtreecommitdiff
path: root/src/FreeType/xttcap.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-10-26 00:06:22 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-01 22:19:24 -0700
commit7d34534c050cb4366c7b14bff585c17d6d578f89 (patch)
tree24a5fad5b544e8e7bdac01fc37e7e561e25989c5 /src/FreeType/xttcap.c
parent8a9fc31628a98e3cdaae6078bb5d92bce06c37ac (diff)
Replace malloc(strlen)+strcpy/strcat calls with strdup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/FreeType/xttcap.c')
-rw-r--r--src/FreeType/xttcap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/FreeType/xttcap.c b/src/FreeType/xttcap.c
index c1d8e67..104dc89 100644
--- a/src/FreeType/xttcap.c
+++ b/src/FreeType/xttcap.c
@@ -234,14 +234,13 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
{
char *p;
- if (NULL == (p = malloc(strlen(strValue)+1))) {
+ if (NULL == (p = strdup(strValue))) {
fprintf(stderr,
"truetype font property : "
"cannot allocate memory.\n");
result = True;
goto quit;
}
- strcpy(p, strValue);
SPropContainer_value_str(&tmpContainerE) = p;
}
break;