From: Patrick Lam Date: Wed, 19 Jul 2006 02:14:28 +0000 (+0000) Subject: 2006-07-19 Jon Burgess (jburgess@uklinux.net) reviewed by: plam X-Git-Tag: 2.3.96~54 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=62a4a8459adaf26833e1dad0ee96ea5a4b8c3d54;p=fontconfig.git 2006-07-19 Jon Burgess (jburgess@uklinux.net) reviewed by: plam Fix file-descriptor leak in FcGlobalCacheDestroy. --- diff --git a/ChangeLog b/ChangeLog index 992a5ee..d8e6404 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-07-19 Jon Burgess (jburgess@uklinux.net) + reviewed by: plam + + * src/fccache.c (FcGlobalCacheDestroy): + + Fix file-descriptor leak in FcGlobalCacheDestroy. + 2006-05-31 Yong Li (rigel863@gmail.com) reviewed by: plam, Bedhad Esfahbod diff --git a/src/fccache.c b/src/fccache.c index 5cb49bd..a653085 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -173,6 +173,8 @@ FcGlobalCacheDestroy (FcGlobalCache *cache) FcGlobalCacheDirDestroy (d); } FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCache)); + if (cache->fd != -1) + close (cache->fd); free (cache); }