]> git.wh0rd.org - fontconfig.git/commitdiff
Fix double-free which occurs because FcValueCanonicalize doesn't create an
authorPatrick Lam <plam@MIT.EDU>
Mon, 2 Jan 2006 17:20:23 +0000 (17:20 +0000)
committerPatrick Lam <plam@MIT.EDU>
Mon, 2 Jan 2006 17:20:23 +0000 (17:20 +0000)
    extra copy of the returned value, it only canonicalizes it.
reviewed by: plam

ChangeLog
src/fccfg.c

index 1429221a28172ee5f26bd30a99f9191bdbdb9884..ee3fb89788b85d8d7272b3460cfd70ff708d59a7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,13 @@
-2005-01-02  Patrick Lam  <plam@mit.edu>
+2006-01-02  Lubos Lunak  <l.lunak@suse.cz>
+       reviewed by: plam
+       
+       * src/fccfg.c (FcConfigEvaluate):
+
+       Fix double-free which occurs because FcValueCanonicalize doesn't
+       create an extra copy of the returned value, it only canonicalizes
+       it.
+
+2006-01-02  Patrick Lam  <plam@mit.edu>
        * doc/fontconfig-user.sgml:
 
        Fix version of .cache file (currently 1 -> currently 2).  Reported
index 56c1a3e3d026c8fa096a8dfebaee2aeb6d9323cd..eefbca982e356e02d085b6e5bb87742241b2cad8 100644 (file)
@@ -823,6 +823,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
        r = FcPatternGet (p, e->u.field, 0, &v);
        if (r != FcResultMatch)
            v.type = FcTypeVoid;
+        v = FcValueSave (v);
        break;
     case FcOpConst:
        if (FcNameConstant (e->u.constant, &v.u.i))