Mercurial > vim
comparison src/scriptfile.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 | a6d218f99ff7 |
children | b5b2e3b824c2 |
comparison
equal
deleted
inserted
replaced
18224:96632a3c3d90 | 18225:6c3a8312486d |
---|---|
1356 free_scriptnames(void) | 1356 free_scriptnames(void) |
1357 { | 1357 { |
1358 int i; | 1358 int i; |
1359 | 1359 |
1360 for (i = script_items.ga_len; i > 0; --i) | 1360 for (i = script_items.ga_len; i > 0; --i) |
1361 { | |
1361 vim_free(SCRIPT_ITEM(i).sn_name); | 1362 vim_free(SCRIPT_ITEM(i).sn_name); |
1363 ga_clear(&SCRIPT_ITEM(i).sn_prl_ga); | |
1364 } | |
1362 ga_clear(&script_items); | 1365 ga_clear(&script_items); |
1363 } | 1366 } |
1364 | 1367 |
1365 void | 1368 void |
1366 free_autoload_scriptnames(void) | 1369 free_autoload_scriptnames(void) |