|
Karsten Hopp |
69f59b |
To: vim-dev@vim.org
|
|
Karsten Hopp |
69f59b |
Subject: Patch 7.1.147
|
|
Karsten Hopp |
69f59b |
Fcc: outbox
|
|
Karsten Hopp |
69f59b |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
69f59b |
Mime-Version: 1.0
|
|
Karsten Hopp |
69f59b |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
69f59b |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
69f59b |
------------
|
|
Karsten Hopp |
69f59b |
|
|
Karsten Hopp |
69f59b |
Patch 7.1.147 (after 7.1.127)
|
|
Karsten Hopp |
69f59b |
Problem: Freeing memory already freed when completing user name. (Meino
|
|
Karsten Hopp |
69f59b |
Cramer)
|
|
Karsten Hopp |
69f59b |
Solution: Use a flag to remember if "orig" needs to be freed.
|
|
Karsten Hopp |
69f59b |
Files: src/ex_getln.c
|
|
Karsten Hopp |
69f59b |
|
|
Karsten Hopp |
69f59b |
|
|
Karsten Hopp |
69f59b |
*** ../vim-7.1.146/src/ex_getln.c Sun Sep 30 22:10:45 2007
|
|
Karsten Hopp |
69f59b |
--- src/ex_getln.c Tue Oct 30 17:13:33 2007
|
|
Karsten Hopp |
69f59b |
***************
|
|
Karsten Hopp |
69f59b |
*** 3353,3358 ****
|
|
Karsten Hopp |
69f59b |
--- 3353,3359 ----
|
|
Karsten Hopp |
69f59b |
char_u *ss = NULL;
|
|
Karsten Hopp |
69f59b |
static int findex;
|
|
Karsten Hopp |
69f59b |
static char_u *orig_save = NULL; /* kept value of orig */
|
|
Karsten Hopp |
69f59b |
+ int orig_saved = FALSE;
|
|
Karsten Hopp |
69f59b |
int i;
|
|
Karsten Hopp |
69f59b |
long_u len;
|
|
Karsten Hopp |
69f59b |
int non_suf_match; /* number without matching suffix */
|
|
Karsten Hopp |
69f59b |
***************
|
|
Karsten Hopp |
69f59b |
*** 3421,3426 ****
|
|
Karsten Hopp |
69f59b |
--- 3422,3428 ----
|
|
Karsten Hopp |
69f59b |
{
|
|
Karsten Hopp |
69f59b |
vim_free(orig_save);
|
|
Karsten Hopp |
69f59b |
orig_save = orig;
|
|
Karsten Hopp |
69f59b |
+ orig_saved = TRUE;
|
|
Karsten Hopp |
69f59b |
|
|
Karsten Hopp |
69f59b |
/*
|
|
Karsten Hopp |
69f59b |
* Do the expansion.
|
|
Karsten Hopp |
69f59b |
***************
|
|
Karsten Hopp |
69f59b |
*** 3546,3552 ****
|
|
Karsten Hopp |
69f59b |
ExpandCleanup(xp);
|
|
Karsten Hopp |
69f59b |
|
|
Karsten Hopp |
69f59b |
/* Free "orig" if it wasn't stored in "orig_save". */
|
|
Karsten Hopp |
69f59b |
! if (orig != orig_save)
|
|
Karsten Hopp |
69f59b |
vim_free(orig);
|
|
Karsten Hopp |
69f59b |
|
|
Karsten Hopp |
69f59b |
return ss;
|
|
Karsten Hopp |
69f59b |
--- 3548,3554 ----
|
|
Karsten Hopp |
69f59b |
ExpandCleanup(xp);
|
|
Karsten Hopp |
69f59b |
|
|
Karsten Hopp |
69f59b |
/* Free "orig" if it wasn't stored in "orig_save". */
|
|
Karsten Hopp |
69f59b |
! if (!orig_saved)
|
|
Karsten Hopp |
69f59b |
vim_free(orig);
|
|
Karsten Hopp |
69f59b |
|
|
Karsten Hopp |
69f59b |
return ss;
|
|
Karsten Hopp |
69f59b |
*** ../vim-7.1.146/src/version.c Mon Oct 29 22:37:57 2007
|
|
Karsten Hopp |
69f59b |
--- src/version.c Tue Oct 30 17:30:35 2007
|
|
Karsten Hopp |
69f59b |
***************
|
|
Karsten Hopp |
69f59b |
*** 668,669 ****
|
|
Karsten Hopp |
69f59b |
--- 668,671 ----
|
|
Karsten Hopp |
69f59b |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
69f59b |
+ /**/
|
|
Karsten Hopp |
69f59b |
+ 147,
|
|
Karsten Hopp |
69f59b |
/**/
|
|
Karsten Hopp |
69f59b |
|
|
Karsten Hopp |
69f59b |
--
|
|
Karsten Hopp |
69f59b |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
69f59b |
59. Your wife says communication is important in a marriage...so you buy
|
|
Karsten Hopp |
69f59b |
another computer and install a second phone line so the two of you can
|
|
Karsten Hopp |
69f59b |
chat.
|
|
Karsten Hopp |
69f59b |
|
|
Karsten Hopp |
69f59b |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
69f59b |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
69f59b |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
69f59b |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|