mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 01:38:16 +00:00
api helpers: Save/restore more values in try_enter/try_leave
This fixes memory leak reported by ASAN. This also somehow fixes test40, though I have no idea why except that that test yields memory leak report.
This commit is contained in:
@@ -565,6 +565,8 @@ static void discard_exception(except_T *excp, int was_finished)
|
||||
void discard_current_exception(void)
|
||||
{
|
||||
discard_exception(current_exception, FALSE);
|
||||
// Note: all globals manipulated here should be saved/restored in
|
||||
// try_enter/try_leave.
|
||||
current_exception = NULL;
|
||||
did_throw = FALSE;
|
||||
need_rethrow = FALSE;
|
||||
|
Reference in New Issue
Block a user