aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fclist.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-28 11:01:55 +0200
committermarha <marha@users.sourceforge.net>2012-03-28 11:01:55 +0200
commit992585b1df5c2d96a2cfac3835afbe818a13165f (patch)
tree83044e54126c98f23108738006a4d4776b70103a /fontconfig/src/fclist.c
parentec617f09d07e32d6f57c0da133f53ad3d43a568a (diff)
downloadvcxsrv-992585b1df5c2d96a2cfac3835afbe818a13165f.tar.gz
vcxsrv-992585b1df5c2d96a2cfac3835afbe818a13165f.tar.bz2
vcxsrv-992585b1df5c2d96a2cfac3835afbe818a13165f.zip
xkeyboard-config pixman fontconfig mesa git update 28 Mar 2012
Diffstat (limited to 'fontconfig/src/fclist.c')
-rw-r--r--fontconfig/src/fclist.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fontconfig/src/fclist.c b/fontconfig/src/fclist.c
index 9a84b5c7e..88025e900 100644
--- a/fontconfig/src/fclist.c
+++ b/fontconfig/src/fclist.c
@@ -67,13 +67,16 @@ FcObjectSetAdd (FcObjectSet *os, const char *object)
low = 0;
mid = 0;
c = 1;
- object = (char *)FcStrStaticName ((FcChar8 *)object);
+ object = (char *)FcSharedStr ((FcChar8 *)object);
while (low <= high)
{
mid = (low + high) >> 1;
c = os->objects[mid] - object;
if (c == 0)
+ {
+ FcSharedStrFree ((FcChar8 *)object);
return FcTrue;
+ }
if (c < 0)
low = mid + 1;
else
@@ -91,8 +94,13 @@ FcObjectSetAdd (FcObjectSet *os, const char *object)
void
FcObjectSetDestroy (FcObjectSet *os)
{
+ int i;
+
if (os->objects)
{
+ for (i = 0; i < os->nobject; i++)
+ FcSharedStrFree ((FcChar8 *)os->objects[i]);
+
FcMemFree (FC_MEM_OBJECTPTR, os->sobject * sizeof (const char *));
free ((void *) os->objects);
}