2 Subject: About patch 7.1.127
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 when doing cmdline completion. (Dominique Pelle)
12 Solution: Free "orig" argument of ExpandOne() when it's not used.
16 *** ../vim-7.1.126/src/ex_getln.c Sat Sep 29 14:15:00 2007
17 --- src/ex_getln.c Sun Sep 30 17:55:47 2007
21 * Return a pointer to alloced memory containing the new string.
22 * Return NULL for failure.
24 + * "orig" is the originally expanded string, copied to allocated memory. It
25 + * should either be kept in orig_save or freed. When "mode" is WILD_NEXT or
26 + * WILD_PREV "orig" should be NULL.
28 * Results are cached in xp->xp_files and xp->xp_numfiles, except when "mode"
29 * is WILD_EXPAND_FREE or WILD_ALL.
36 ! /* free old names */
37 if (xp->xp_numfiles != -1 && mode != WILD_ALL && mode != WILD_LONGEST)
39 FreeWild(xp->xp_numfiles, xp->xp_files);
44 ! /* free old names */
45 if (xp->xp_numfiles != -1 && mode != WILD_ALL && mode != WILD_LONGEST)
47 FreeWild(xp->xp_numfiles, xp->xp_files);
52 if (mode == WILD_EXPAND_FREE || mode == WILD_ALL)
55 + /* Free "orig" if it wasn't stored in "orig_save". */
56 + if (orig != orig_save)
61 *** ../vim-7.1.126/src/version.c Sun Sep 30 14:00:41 2007
62 --- src/version.c Sun Sep 30 14:20:14 2007
66 { /* Add new patch number below this line */
72 A M00se once bit my sister ...
73 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
75 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
76 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
77 \\\ download, build and distribute -- http://www.A-A-P.org ///
78 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///