vim-patch:8.2.0883: memory leak in test 49

Problem:    Memory leak in test 49.
Solution:   Free "sfile" from the exception.

5fbf3bc3f9

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-05 21:37:57 +08:00
parent 43681f2375
commit cb8bc9b33c

View File

@@ -807,6 +807,7 @@ int do_cmdline(char *cmdline, LineGetter fgetline, void *cookie, int flags)
next = messages->next; next = messages->next;
emsg(messages->msg); emsg(messages->msg);
xfree(messages->msg); xfree(messages->msg);
xfree(messages->sfile);
xfree(messages); xfree(messages);
messages = next; messages = next;
} while (messages != NULL); } while (messages != NULL);