diff options
author | oni-link <knil.ino@gmail.com> | 2015-11-11 16:45:50 +0100 |
---|---|---|
committer | oni-link <knil.ino@gmail.com> | 2015-11-13 15:59:46 +0100 |
commit | 1c43452afcada9b7163e33d47c7b6bdaf82abded (patch) | |
tree | 4c33e545507c2e1f9b4dfe081c2b7a9c6ca6dfc3 /src/nvim/memory.c | |
parent | 1d9ae27e380159c1a2f98448feab48e9be0e56dd (diff) | |
download | rneovim-1c43452afcada9b7163e33d47c7b6bdaf82abded.tar.gz rneovim-1c43452afcada9b7163e33d47c7b6bdaf82abded.tar.bz2 rneovim-1c43452afcada9b7163e33d47c7b6bdaf82abded.zip |
memory.c: Prevent garbage collection when running out of memory.
When running out of memory, garbage collection would free lists and
dictionaries that are not yet referenced. This would later on lead to
a use-after-free for these objects.
Releated to vim-patch:7.4.916, so also updating version.c.
Patch by @ZyX-I
Diffstat (limited to 'src/nvim/memory.c')
-rw-r--r-- | src/nvim/memory.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c index d25dc7c941..6d386f3599 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -42,8 +42,6 @@ void try_to_free_memory(void) clear_sb_text(); // Try to save all buffers and release as many blocks as possible mf_release_all(); - // cleanup recursive lists/dicts - garbage_collect(); trying_to_free = false; } |