mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 9.0.0074: Coverity warns for double free
Problem: Coverity warns for double free. Solution: Reset cts_text_prop_count when freeing cts_text_props.
This commit is contained in:
@@ -964,7 +964,10 @@ clear_chartabsize_arg(chartabsize_T *cts UNUSED)
|
||||
{
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
if (cts->cts_text_prop_count > 0)
|
||||
{
|
||||
vim_free(cts->cts_text_props);
|
||||
cts->cts_text_prop_count = 0; // avoid double free
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user