comparison src/buffer.c @ 18225:6c3a8312486d v8.1.2107

patch 8.1.2107: various memory leaks reported by asan Commit: https://github.com/vim/vim/commit/8617348e2110c2c8387ea448a6258f1effa8d249 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 1 17:02:16 2019 +0200 patch 8.1.2107: various memory leaks reported by asan Problem: Various memory leaks reported by asan. Solution: Free the memory. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/5003)
author Bram Moolenaar <Bram@vim.org>
date Tue, 01 Oct 2019 17:15:04 +0200
parents e0ec4cd7a865
children 18d7337b6837
comparison
equal deleted inserted replaced
18224:96632a3c3d90 18225:6c3a8312486d
878 free_buffer_stuff(buf, TRUE); 878 free_buffer_stuff(buf, TRUE);
879 #ifdef FEAT_EVAL 879 #ifdef FEAT_EVAL
880 /* b:changedtick uses an item in buf_T, remove it now */ 880 /* b:changedtick uses an item in buf_T, remove it now */
881 dictitem_remove(buf->b_vars, (dictitem_T *)&buf->b_ct_di); 881 dictitem_remove(buf->b_vars, (dictitem_T *)&buf->b_ct_di);
882 unref_var_dict(buf->b_vars); 882 unref_var_dict(buf->b_vars);
883 remove_listeners(buf);
883 #endif 884 #endif
884 #ifdef FEAT_LUA 885 #ifdef FEAT_LUA
885 lua_buffer_free(buf); 886 lua_buffer_free(buf);
886 #endif 887 #endif
887 #ifdef FEAT_MZSCHEME 888 #ifdef FEAT_MZSCHEME
906 free_terminal(buf); 907 free_terminal(buf);
907 #endif 908 #endif
908 #ifdef FEAT_JOB_CHANNEL 909 #ifdef FEAT_JOB_CHANNEL
909 vim_free(buf->b_prompt_text); 910 vim_free(buf->b_prompt_text);
910 free_callback(&buf->b_prompt_callback); 911 free_callback(&buf->b_prompt_callback);
912 free_callback(&buf->b_prompt_interrupt);
911 #endif 913 #endif
912 914
913 buf_hashtab_remove(buf); 915 buf_hashtab_remove(buf);
914 916
915 aubuflocal_remove(buf); 917 aubuflocal_remove(buf);