From 8aa0e6c60da5f7a4b04eaead40d183fd8e5640a4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 20 Jan 2022 11:27:58 +0000 Subject: patch 8.2.4150: Coverity warns for using pointer after free Problem: Coverity warns for using pointer after free. Solution: Swap statements, even though using the pointer is no problem. --- src/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map.c') 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); } /* -- cgit v1.2.1