To: vim_dev@googlegroups.com Subject: Patch 9.0.0624 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0624 Problem: Leaking argument type array. Solution: Add allocated memory to type_gap. Files: src/vim9type.c *** ../vim-9.0.0623/src/vim9type.c 2022-09-29 19:14:37.675876694 +0100 --- src/vim9type.c 2022-09-29 20:20:52.009055427 +0100 *************** *** 58,70 **** return type; *copy = *type; ! if (type->tt_args != NULL) ! { ! copy->tt_args = ALLOC_MULT(type_T *, type->tt_argcount); ! if (copy->tt_args != NULL) ! for (int i = 0; i < type->tt_argcount; ++i) ! copy->tt_args[i] = type->tt_args[i]; ! } return copy; } --- 58,67 ---- return type; *copy = *type; ! if (type->tt_args != NULL ! && func_type_add_arg_types(copy, type->tt_argcount, type_gap) == OK) ! for (int i = 0; i < type->tt_argcount; ++i) ! copy->tt_args[i] = type->tt_args[i]; return copy; } *** ../vim-9.0.0623/src/version.c 2022-09-29 19:14:37.679876726 +0100 --- src/version.c 2022-09-29 20:21:39.984826388 +0100 *************** *** 701,702 **** --- 701,704 ---- { /* Add new patch number below this line */ + /**/ + 624, /**/ -- Your fault: core dumped /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///