diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2026-07-03 15:16:40 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2026-07-03 15:18:30 +0800 |
| commit | 6f98352163057a0bea06d3859747a01558af3772 (patch) | |
| tree | d679157e3740f3e367e3de222428b5722ebd8a73 /test/functional/vimscript/executable_spec.lua | |
| parent | 87c23199864f2c510ab4778db2c9c86ca5a54896 (diff) | |
| download | rneovim-6f98352163057a0bea06d3859747a01558af3772.tar.gz rneovim-6f98352163057a0bea06d3859747a01558af3772.tar.bz2 rneovim-6f98352163057a0bea06d3859747a01558af3772.zip | |
vim-patch:9.2.0770: dict_add_dict() has inconsistent ownership on failure
Problem: dict_add_dict() frees the passed dict on one failure path
(when dict_add() fails) but not on the other (when
dictitem_alloc() fails), so a caller cannot tell whether it
still owns the dict after a failure. Callers that unref the
dict on failure (e.g. in window.c) then double-free it when
dict_add() fails.
Solution: Make the failure contract consistent: on failure leave the
passed dict untouched and owned by the caller; only take a
reference on success.
related: vim/vim#20668
Supported by AI.
https://github.com/vim/vim/commit/12dbe788d461f7f01a908e9e9ecc844f85d71cb4
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions