1
0
Fork 0
mirror of git://slackware.nl/current.git synced 2025-01-14 08:01:11 +01:00
slackware-current/source/ap/vim/patches/7.2.153
Patrick J Volkerding 5a12e7c134 Slackware 13.0
Wed Aug 26 10:00:38 CDT 2009
Slackware 13.0 x86_64 is released as stable!  Thanks to everyone who
helped make this release possible -- see the RELEASE_NOTES for the
credits.  The ISOs are off to the replicator.  This time it will be a
6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We're taking pre-orders now at store.slackware.com.  Please consider
picking up a copy to help support the project.  Once again, thanks to
the entire Slackware community for all the help testing and fixing
things and offering suggestions during this development cycle.
As always, have fun and enjoy!  -P.
2018-05-31 22:41:17 +02:00

97 lines
2.8 KiB
Text

To: vim-dev@vim.org
Subject: Patch 7.2.153
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------
Patch 7.2.153
Problem: Memory leak for ":recover empty_dir/".
Solution: Free files[] when it becomes empty. (Dominique Pelle)
Files: src/memline.c
*** ../vim-7.2.152/src/memline.c Sun Jul 13 19:40:43 2008
--- src/memline.c Wed Apr 22 11:48:35 2009
***************
*** 1554,1563 ****
for (i = 0; i < num_files; ++i)
if (fullpathcmp(p, files[i], TRUE) & FPC_SAME)
{
vim_free(files[i]);
! --num_files;
! for ( ; i < num_files; ++i)
! files[i] = files[i + 1];
}
}
if (nr > 0)
--- 1554,1568 ----
for (i = 0; i < num_files; ++i)
if (fullpathcmp(p, files[i], TRUE) & FPC_SAME)
{
+ /* Remove the name from files[i]. Move further entries
+ * down. When the array becomes empty free it here, since
+ * FreeWild() won't be called below. */
vim_free(files[i]);
! if (--num_files == 0)
! vim_free(files);
! else
! for ( ; i < num_files; ++i)
! files[i] = files[i + 1];
}
}
if (nr > 0)
***************
*** 3522,3528 ****
if (errno == EINVAL || errno == ENOENT)
{
/* Found non-symlink or not existing file, stop here.
! * When at the first level use the unmodifed name, skip the
* call to vim_FullName(). */
if (depth == 1)
return FAIL;
--- 3527,3533 ----
if (errno == EINVAL || errno == ENOENT)
{
/* Found non-symlink or not existing file, stop here.
! * When at the first level use the unmodified name, skip the
* call to vim_FullName(). */
if (depth == 1)
return FAIL;
***************
*** 4560,4566 ****
buf->b_ml.ml_chunksize + curix,
(buf->b_ml.ml_usedchunks - curix) *
sizeof(chunksize_T));
! /* Compute length of first half of lines in the splitted chunk */
size = 0;
linecnt = 0;
while (curline < buf->b_ml.ml_line_count
--- 4568,4574 ----
buf->b_ml.ml_chunksize + curix,
(buf->b_ml.ml_usedchunks - curix) *
sizeof(chunksize_T));
! /* Compute length of first half of lines in the split chunk */
size = 0;
linecnt = 0;
while (curline < buf->b_ml.ml_line_count
*** ../vim-7.2.152/src/version.c Wed Apr 22 14:42:26 2009
--- src/version.c Wed Apr 22 15:34:18 2009
***************
*** 678,679 ****
--- 678,681 ----
{ /* Add new patch number below this line */
+ /**/
+ 153,
/**/
--
Windows
M!uqoms
/// 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 ///