comparison src/terminal.c @ 18595:517bfb2998aa v8.1.2291

patch 8.1.2291: memory leak when executing command in a terminal Commit: https://github.com/vim/vim/commit/adf4aa200b026dce91dd169143ee8b93e848ec8b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 10 22:36:44 2019 +0100 patch 8.1.2291: memory leak when executing command in a terminal Problem: Memory leak when executing command in a terminal. Solution: Free "argv". (Dominique Pelle, closes https://github.com/vim/vim/issues/5208)
author Bram Moolenaar <Bram@vim.org>
date Sun, 10 Nov 2019 22:45:03 +0100
parents dfdc29643c91
children 7e7ec935e7c8
comparison
equal deleted inserted replaced
18594:e9a47bcf7b94 18595:517bfb2998aa
842 char_u *tofree2 = NULL; 842 char_u *tofree2 = NULL;
843 843
844 // :term ++shell command 844 // :term ++shell command
845 if (unix_build_argv(cmd, &argv, &tofree1, &tofree2) == OK) 845 if (unix_build_argv(cmd, &argv, &tofree1, &tofree2) == OK)
846 term_start(NULL, argv, &opt, eap->forceit ? TERM_START_FORCEIT : 0); 846 term_start(NULL, argv, &opt, eap->forceit ? TERM_START_FORCEIT : 0);
847 vim_free(argv);
847 vim_free(tofree1); 848 vim_free(tofree1);
848 vim_free(tofree2); 849 vim_free(tofree2);
849 goto theend; 850 goto theend;
850 #else 851 #else
851 # ifdef MSWIN 852 # ifdef MSWIN