Mercurial > vim
diff src/misc2.c @ 14954:69d2749a6a2f v8.1.0488
patch 8.1.0488: using freed memory in quickfix code
commit https://github.com/vim/vim/commit/9f84ded38b62c82a4ee57b54f403b1b185ed8170
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 20 20:54:02 2018 +0200
patch 8.1.0488: using freed memory in quickfix code
Problem: Using freed memory in quickfix code. (Dominique Pelle)
Solution: Add the quickfix_busy() flag to postpone deleting quickfix lists
until it is safe. (Yegappan Lakshmanan, closes #3538)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 Oct 2018 21:00:06 +0200 |
parents | c1e94bb0f004 |
children | c338c91086b9 |
line wrap: on
line diff
--- a/src/misc2.c +++ b/src/misc2.c @@ -1231,18 +1231,18 @@ free_all_mem(void) buf = firstbuf; } -#ifdef FEAT_ARABIC +# ifdef FEAT_ARABIC free_cmdline_buf(); -#endif +# endif /* Clear registers. */ clear_registers(); ResetRedobuff(); ResetRedobuff(); -#if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11) +# if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11) vim_free(serverDelayedStartName); -#endif +# endif /* highlight info */ free_highlight(); @@ -1265,9 +1265,9 @@ free_all_mem(void) # ifdef FEAT_JOB_CHANNEL channel_free_all(); # endif -#ifdef FEAT_TIMERS +# ifdef FEAT_TIMERS timer_free_all(); -#endif +# endif # ifdef FEAT_EVAL /* must be after channel_free_all() with unrefs partials */ eval_clear(); @@ -1282,16 +1282,19 @@ free_all_mem(void) /* screenlines (can't display anything now!) */ free_screenlines(); -#if defined(USE_XSMP) +# if defined(USE_XSMP) xsmp_close(); -#endif -#ifdef FEAT_GUI_GTK +# endif +# ifdef FEAT_GUI_GTK gui_mch_free_all(); -#endif +# endif clear_hl_tables(); vim_free(IObuff); vim_free(NameBuff); +# ifdef FEAT_QUICKFIX + check_quickfix_busy(); +# endif } #endif