forked from aniani/vim
patch 8.0.1214: accessing freed memory when EXITFREE is set
Problem: Accessing freed memory when EXITFREE is set and there is more than one tab and window. (Dominique Pelle) Solution: Free options later. Skip redraw when exiting.
This commit is contained in:
@@ -1135,7 +1135,6 @@ free_all_mem(void)
|
|||||||
free_all_autocmds();
|
free_all_autocmds();
|
||||||
# endif
|
# endif
|
||||||
clear_termcodes();
|
clear_termcodes();
|
||||||
free_all_options();
|
|
||||||
free_all_marks();
|
free_all_marks();
|
||||||
alist_clear(&global_alist);
|
alist_clear(&global_alist);
|
||||||
free_homedir();
|
free_homedir();
|
||||||
@@ -1196,6 +1195,9 @@ free_all_mem(void)
|
|||||||
/* Destroy all windows. Must come before freeing buffers. */
|
/* Destroy all windows. Must come before freeing buffers. */
|
||||||
win_free_all();
|
win_free_all();
|
||||||
|
|
||||||
|
/* Free all option values. Must come after closing windows. */
|
||||||
|
free_all_options();
|
||||||
|
|
||||||
/* Free all buffers. Reset 'autochdir' to avoid accessing things that
|
/* Free all buffers. Reset 'autochdir' to avoid accessing things that
|
||||||
* were freed already. */
|
* were freed already. */
|
||||||
#ifdef FEAT_AUTOCHDIR
|
#ifdef FEAT_AUTOCHDIR
|
||||||
|
@@ -203,7 +203,7 @@ redraw_win_later(
|
|||||||
win_T *wp,
|
win_T *wp,
|
||||||
int type)
|
int type)
|
||||||
{
|
{
|
||||||
if (wp->w_redr_type < type)
|
if (!exiting && wp->w_redr_type < type)
|
||||||
{
|
{
|
||||||
wp->w_redr_type = type;
|
wp->w_redr_type = type;
|
||||||
if (type >= NOT_VALID)
|
if (type >= NOT_VALID)
|
||||||
|
@@ -761,6 +761,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1214,
|
||||||
/**/
|
/**/
|
||||||
1213,
|
1213,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user