]> git.wh0rd.org - fontconfig.git/blobdiff - src/fccharset.c
Fix up fc-cache and fc-cat for no global cache changes.
[fontconfig.git] / src / fccharset.c
index 531a9b8cc6e8edd8935b0dfd9963c720081c5d30..e0a09612859857e4bd557d3ebff890b62f2d8c0f 100644 (file)
@@ -22,8 +22,8 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <stdlib.h>
 #include "fcint.h"
+#include <stdlib.h>
 
 /* #define CHECK */
 
@@ -177,7 +177,10 @@ FcCharSetPutLeaf (FcCharSet        *fcs,
        FcMemAlloc (FC_MEM_CHARSET, (fcs->num + 1) * sizeof (FcCharLeaf *));
        numbers = malloc ((fcs->num + 1) * sizeof (FcChar16));
        if (!numbers)
+        {
+           free (leaves);
            return FcFalse;
+        }
        FcMemAlloc (FC_MEM_CHARSET, (fcs->num + 1) * sizeof (FcChar16));
 
        for (i = 0; i < fcs->num; i++)
@@ -625,7 +628,7 @@ FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b)
            int         i = 256/32;
            if (ai.ucs4 == bi.ucs4)
            {
-               FcChar32        *bm = bi.leaf->map;;
+               FcChar32        *bm = bi.leaf->map;
                while (i--)
                    count += FcCharSetPopCount (*am++ & ~*bm++);
            }