fix(eval): prevent double-free in garbage collection (#22990)

This commit is contained in:
zeertzjq
2023-04-10 18:06:59 +08:00
committed by GitHub
parent 5ed7ede1f5
commit 0e4086b741
2 changed files with 36 additions and 1 deletions

View File

@@ -1149,7 +1149,7 @@ void vars_clear_ext(hashtab_T *ht, int free_val)
}
}
hash_clear(ht);
ht->ht_used = 0;
hash_init(ht);
}
/// Delete a variable from hashtab "ht" at item "hi".