| To: vim-dev@vim.org |
| Subject: Patch 7.1.230 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.1.230 |
| Problem: Memory leak when executing SourceCmd autocommands. |
| Solution: Free the memory. (Dominique Pelle) |
| Files: src/ex_cmds2.c |
| |
| |
| |
| |
| |
| *** 2889,2899 **** |
| if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL) |
| && apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp, |
| FALSE, curbuf)) |
| # ifdef FEAT_EVAL |
| ! return aborting() ? FAIL : OK; |
| # else |
| ! return OK; |
| # endif |
| |
| /* Apply SourcePre autocommands, they may get the file. */ |
| apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf); |
| --- 2889,2902 ---- |
| if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL) |
| && apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp, |
| FALSE, curbuf)) |
| + { |
| # ifdef FEAT_EVAL |
| ! retval = aborting() ? FAIL : OK; |
| # else |
| ! retval = OK; |
| # endif |
| + goto theend; |
| + } |
| |
| /* Apply SourcePre autocommands, they may get the file. */ |
| apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf); |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 230, |
| /**/ |
| |
| -- |
| Citizens are not allowed to attend a movie house or theater nor ride in a |
| public streetcar within at least four hours after eating garlic. |
| [real standing law in Indiana, United States of America] |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |