This patch fixes memory leak in FcDirCacheWrite when hash collision occurs (Coverity defect #1829) -- Frederic Crozat <fcrozat@xxxxxxxxxxxx> Mandriva
Index: ChangeLog =================================================================== RCS file: /cvs/fontconfig/fontconfig/ChangeLog,v retrieving revision 1.109.2.185 diff -u -p -r1.109.2.185 ChangeLog --- ChangeLog 7 Apr 2006 18:07:51 -0000 1.109.2.185 +++ ChangeLog 10 Apr 2006 12:47:35 -0000 @@ -1,3 +1,8 @@ +2006-04-10 Frederic Crozat <fcrozat@xxxxxxxxxxxx> + + * src/fccache.c: (FcDirCacheWrite): + Fix memory leak with hash collision (Coverity defect #1829). + 2006-04-07 Dominic Lachowicz <cinamod@xxxxxxxxxxx> reviewed by: plam * fc-cache/Makefile.am: Index: src/fccache.c =================================================================== RCS file: /cvs/fontconfig/fontconfig/src/fccache.c,v retrieving revision 1.23.4.80 diff -u -p -r1.23.4.80 fccache.c --- src/fccache.c 7 Apr 2006 04:42:32 -0000 1.23.4.80 +++ src/fccache.c 10 Apr 2006 12:47:35 -0000 @@ -1311,12 +1311,15 @@ if(!FcCacheReadString (fd, name_buf, sizeof (name_buf)) || !strlen(name_buf)) { close (fd); + FcStrFree ((FcChar8 *)cache_hashed); continue; } close (fd); - if (strcmp (name_buf, cache_file) != 0) + if (strcmp (name_buf, cache_file) != 0) { + FcStrFree ((FcChar8 *)cache_hashed); continue; + } break; } while (1);
_______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig