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