X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffcpat.c;h=792a164f9dddf3462525e16067205d469891d72c;hb=efe5eae26b2443363b1000b3197d1731a40f8af9;hp=188f560bfd6398a54ce3a9caaf515df47f274a6f;hpb=8ea654b2aa6b4e97b369e299325da49807559511;p=fontconfig.git diff --git a/src/fcpat.c b/src/fcpat.c index 188f560..792a164 100644 --- a/src/fcpat.c +++ b/src/fcpat.c @@ -98,7 +98,7 @@ FcValueSave (FcValue v) { switch (v.type) { case FcTypeString: - v.u.s = FcStrCopy (v.u.s); + v.u.s = FcStrStaticName (v.u.s); if (!v.u.s) v.type = FcTypeVoid; break; @@ -482,15 +482,7 @@ FcPatternObjectAddWithBinding (FcPattern *p, memset(new, 0, sizeof (FcValueList)); FcMemAlloc (FC_MEM_VALLIST, sizeof (FcValueList)); - /* dup string */ - if (value.type == FcTypeString) - { - value.u.s = FcStrStaticName (value.u.s); - if (!value.u.s) - value.type = FcTypeVoid; - } - else - value = FcValueSave (value); + value = FcValueSave (value); if (value.type == FcTypeVoid) goto bail1;