4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Memory leak for ":recover empty_dir/".
12 Solution: Free files[] when it becomes empty. (Dominique Pelle)
16 *** ../vim-7.2.152/src/memline.c Sun Jul 13 19:40:43 2008
17 --- src/memline.c Wed Apr 22 11:48:35 2009
20 for (i = 0; i < num_files; ++i)
21 if (fullpathcmp(p, files[i], TRUE) & FPC_SAME)
25 ! for ( ; i < num_files; ++i)
26 ! files[i] = files[i + 1];
31 for (i = 0; i < num_files; ++i)
32 if (fullpathcmp(p, files[i], TRUE) & FPC_SAME)
34 + /* Remove the name from files[i]. Move further entries
35 + * down. When the array becomes empty free it here, since
36 + * FreeWild() won't be called below. */
38 ! if (--num_files == 0)
41 ! for ( ; i < num_files; ++i)
42 ! files[i] = files[i + 1];
48 if (errno == EINVAL || errno == ENOENT)
50 /* Found non-symlink or not existing file, stop here.
51 ! * When at the first level use the unmodifed name, skip the
52 * call to vim_FullName(). */
56 if (errno == EINVAL || errno == ENOENT)
58 /* Found non-symlink or not existing file, stop here.
59 ! * When at the first level use the unmodified name, skip the
60 * call to vim_FullName(). */
65 buf->b_ml.ml_chunksize + curix,
66 (buf->b_ml.ml_usedchunks - curix) *
68 ! /* Compute length of first half of lines in the splitted chunk */
71 while (curline < buf->b_ml.ml_line_count
73 buf->b_ml.ml_chunksize + curix,
74 (buf->b_ml.ml_usedchunks - curix) *
76 ! /* Compute length of first half of lines in the split chunk */
79 while (curline < buf->b_ml.ml_line_count
80 *** ../vim-7.2.152/src/version.c Wed Apr 22 14:42:26 2009
81 --- src/version.c Wed Apr 22 15:34:18 2009
85 { /* Add new patch number below this line */
94 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
95 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
96 \\\ download, build and distribute -- http://www.A-A-P.org ///
97 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///