patch 9.1.0341: Problem: a few memory leaks are found

Problem:  a few memory leaks are found
          (LuMingYinDetect )
Solution: properly free the memory

Fixes the following problems:
- Memory leak in f_maplist()
  fixes: #14486

- Memory leak in option.c
  fixes: #14485

- Memory leak in f_resolve()
  fixes: #14484

- Memory leak in f_autocmd_get()
  related: #14474

- Memory leak in dict_extend_func()
  fixes: #14477
  fixes: #14238

closes: #14517

Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/filepath.c b/src/filepath.c
index cbf2da4..3bf8a2d 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -2110,6 +2110,7 @@
 	if (buf == NULL)
 	{
 	    vim_free(p);
+	    vim_free(remain);
 	    goto fail;
 	}