Skip to content

Commit

Permalink
patch 8.2.4150: Coverity warns for using pointer after free
Browse files Browse the repository at this point in the history
Problem:    Coverity warns for using pointer after free.
Solution:   Swap statements, even though using the pointer is no problem.
  • Loading branch information
brammool committed Jan 20, 2022
1 parent ca34db3 commit 8aa0e6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/map.c
Expand Up @@ -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);
}

/*
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4150,
/**/
4149,
/**/
Expand Down

0 comments on commit 8aa0e6c

Please sign in to comment.