diff src/message.c @ 19685:d64f403289db v8.2.0399

patch 8.2.0399: various memory leaks Commit: https://github.com/vim/vim/commit/292b90d4fa11022661f449dd3efb73d5ac737313 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 18 15:23:16 2020 +0100 patch 8.2.0399: various memory leaks Problem: Various memory leaks. Solution: Avoid the leaks. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/5803)
author Bram Moolenaar <Bram@vim.org>
date Wed, 18 Mar 2020 15:30:04 +0100
parents 2aaef1547255
children 7196cd9d8397
line wrap: on
line diff
--- a/src/message.c
+++ b/src/message.c
@@ -865,6 +865,7 @@ emsg_namelen(char *msg, char_u *name, in
     char_u *copy = vim_strnsave((char_u *)name, len);
 
     semsg(msg, copy == NULL ? "NULL" : (char *)copy);
+    vim_free(copy);
 }
 
 /*