patch 7.4.989
Problem:    Leaking memory when hash_add() fails. Coverity error 99126.
Solution:   When hash_add() fails free the memory.
diff --git a/src/eval.c b/src/eval.c
index a2d2939..eca8224 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -23095,7 +23095,11 @@
 
 	/* insert the new function in the function list */
 	STRCPY(fp->uf_name, name);
-	hash_add(&func_hashtab, UF2HIKEY(fp));
+	if (hash_add(&func_hashtab, UF2HIKEY(fp)) == FAIL)
+	{
+	    vim_free(fp);
+	    goto erret;
+	}
     }
     fp->uf_args = newargs;
     fp->uf_lines = newlines;