summaryrefslogtreecommitdiff
path: root/src/map.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-20 11:27:58 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-20 11:27:58 +0000
commit8aa0e6c60da5f7a4b04eaead40d183fd8e5640a4 (patch)
tree149847bbf5b2f627ab0fbd70d85541c81b73d84b /src/map.c
parentca34db3bdef7238b203386dc82b975ffdf26f839 (diff)
downloadvim-git-8aa0e6c60da5f7a4b04eaead40d183fd8e5640a4.tar.gz
patch 8.2.4150: Coverity warns for using pointer after freev8.2.4150
Problem: Coverity warns for using pointer after free. Solution: Swap statements, even though using the pointer is no problem.
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map.c b/src/map.c
index ff117dc6d..8d60eee25 100644
--- a/src/map.c
+++ b/src/map.c
@@ -84,10 +84,10 @@ map_free(mapblock_T **mpp)
vim_free(mp->m_str);
vim_free(mp->m_orig_str);
*mpp = mp->m_next;
- vim_free(mp);
#ifdef FEAT_EVAL
reset_last_used_map(mp);
#endif
+ vim_free(mp);
}
/*