Patch 8.2.1087 Problem: Possible memory leak when file expansion fails. Solution: Clear the grow array when returning FAIL. Use an error message instead of an empty string. Files: src/filepath.c
*** ../vim-8.2.1086/src/filepath.c 2020-06-24 20:33:59.565106319 +0200 --- src/filepath.c 2020-06-29 20:50:56.900442778 +0200 *************** *** 3813,3820 **** vim_free(p); } *num_file = ga.ga_len; ! *file = (ga.ga_data != NULL) ? (char_u **)ga.ga_data : (char_u **)""; recursive = FALSE; --- 3813,3825 ---- vim_free(p); } + // When returning FAIL the array must be freed here. + if (retval == FAIL) + ga_clear(&ga); + *num_file = ga.ga_len; ! *file = (ga.ga_data != NULL) ? (char_u **)ga.ga_data ! : (char_u **)_("no matches"); recursive = FALSE; *** ../vim-8.2.1086/src/version.c 2020-06-29 20:40:34.026867204 +0200 --- src/version.c 2020-06-29 20:51:08.880389518 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1087, /**/ -- FATAL ERROR! SYSTEM HALTED! - Press any key to continue doing nothing. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202006291915.05TJFTYT690123%40masaka.moolenaar.net.