From: Patrick Lam Date: Mon, 2 Jan 2006 17:20:23 +0000 (+0000) Subject: Fix double-free which occurs because FcValueCanonicalize doesn't create an X-Git-Tag: fc-2_3_94~75 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=52ac91f7c1a8a6433851cbde8ccade618f0218e4;p=fontconfig.git Fix double-free which occurs because FcValueCanonicalize doesn't create an extra copy of the returned value, it only canonicalizes it. reviewed by: plam --- diff --git a/ChangeLog b/ChangeLog index 1429221..ee3fb89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,13 @@ -2005-01-02 Patrick Lam +2006-01-02 Lubos Lunak + 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 * doc/fontconfig-user.sgml: Fix version of .cache file (currently 1 -> currently 2). Reported diff --git a/src/fccfg.c b/src/fccfg.c index 56c1a3e..eefbca9 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -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))