1
0
forked from aniani/vim

patch 8.2.0571: double free when passing invalid argument to job_start()

Problem:    Double free when passing invalid argument to job_start().
Solution:   Clear the argument when freed. (Masato Nishihata, closes #5926)
This commit is contained in:
Bram Moolenaar
2020-04-13 17:44:47 +02:00
parent 6e949784be
commit 0015795baa
3 changed files with 6 additions and 0 deletions

View File

@@ -4356,7 +4356,10 @@ build_argv_from_list(list_T *l, char ***argv, int *argc)
int i;
for (i = 0; i < *argc; ++i)
{
vim_free((*argv)[i]);
(*argv)[i] = NULL;
}
return FAIL;
}
(*argv)[*argc] = (char *)vim_strsave(s);