summaryrefslogtreecommitdiffstats
path: root/src/textprop.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-25 16:31:51 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-25 16:31:51 +0000
commitef2c325f5e3c437b722bb96bf369ba2a5c541163 (patch)
treedc85f0dc98dce1937b459d8d3882473f25db03c3 /src/textprop.c
parentc1cf4c91072f91b6b8dd636627a4ddf6f4b21f16 (diff)
patch 9.0.0949: crash when unletting a variable while listing variablesv9.0.0949
Problem: Crash when unletting a variable while listing variables. Solution: Disallow changing a hashtable while going over the entries. (closes #11435)
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/textprop.c b/src/textprop.c
index dee35c3ecf..789ab8ffe4 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1789,7 +1789,7 @@ prop_type_set(typval_T *argvars, int add)
}
hash_init(*htp);
}
- hash_add(*htp, PT2HIKEY(prop));
+ hash_add(*htp, PT2HIKEY(prop), "prop type");
}
else
{
@@ -1924,7 +1924,7 @@ f_prop_type_delete(typval_T *argvars, typval_T *rettv UNUSED)
ht = buf->b_proptypes;
VIM_CLEAR(buf->b_proparray);
}
- hash_remove(ht, hi);
+ hash_remove(ht, hi, "prop type delete");
vim_free(prop);
}
}