patch 9.0.0926: Coverity warns for not using return value of dict_add()
Problem: Coverity warns for not using return value of dict_add().
Solution: When dict_add() fails then don't call hash_remove().
diff --git a/src/dict.c b/src/dict.c
index 30264a9..ffd5d38 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -1122,10 +1122,11 @@
{
if (*action == 'm')
{
- // cheap way to move a dict item from "d2" to "d1"
+ // Cheap way to move a dict item from "d2" to "d1".
+ // If dict_add() fails then "d2" won't be empty.
di1 = HI2DI(hi2);
- dict_add(d1, di1);
- hash_remove(&d2->dv_hashtab, hi2);
+ if (dict_add(d1, di1) == OK)
+ hash_remove(&d2->dv_hashtab, hi2);
}
else
{
diff --git a/src/version.c b/src/version.c
index 6ccc704..c9e3a2e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 926,
+/**/
925,
/**/
924,