From 992585b1df5c2d96a2cfac3835afbe818a13165f Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 28 Mar 2012 11:01:55 +0200 Subject: xkeyboard-config pixman fontconfig mesa git update 28 Mar 2012 --- fontconfig/src/fclist.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'fontconfig/src/fclist.c') 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); } -- cgit v1.2.3