]> git.wh0rd.org - fontconfig.git/blobdiff - src/fccfg.c
Added new FcFini function for cleaning up all memory. Fixed a few memory
[fontconfig.git] / src / fccfg.c
index 7b5d693b4a54f97bcd8c87c4b58f94a9534f6e85..12cad846f057a9c008d74a22554109caecdec423 100644 (file)
@@ -160,6 +160,8 @@ FcSubstDestroy (FcSubst *s)
            FcTestDestroy (s->test);
        if (s->edit)
            FcEditDestroy (s->edit);
+       free (s);
+       FcMemFree (FC_MEM_SUBST, sizeof (FcSubst));
        s = n;
     }
 }
@@ -178,6 +180,9 @@ FcConfigDestroy (FcConfig *config)
     FcStrSetDestroy (config->acceptGlobs);
     FcStrSetDestroy (config->rejectGlobs);
 
+    if (config->blanks)
+       FcBlanksDestroy (config->blanks);
+
     if (config->cache)
        FcStrFree (config->cache);
 
@@ -186,6 +191,7 @@ FcConfigDestroy (FcConfig *config)
     for (set = FcSetSystem; set <= FcSetApplication; set++)
        if (config->fonts[set])
            FcFontSetDestroy (config->fonts[set]);
+
     free (config);
     FcMemFree (FC_MEM_CONFIG, sizeof (FcConfig));
 }