0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 7.4.1597

Problem:    Memory leak when out of memory. (Coverity)
Solution:   Free the name.
This commit is contained in:
Bram Moolenaar
2016-03-19 14:22:11 +01:00
parent ba8cd122ef
commit 9f6154f26e
2 changed files with 5 additions and 1 deletions

View File

@@ -11904,7 +11904,9 @@ f_function(typval_T *argvars, typval_T *rettv)
partial_T *pt = (partial_T *)alloc_clear(sizeof(partial_T));
/* result is a VAR_PARTIAL */
if (pt != NULL)
if (pt == NULL)
vim_free(name);
else
{
if (arg_idx > 0 || (arg_pt != NULL && arg_pt->pt_argc > 0))
{

View File

@@ -748,6 +748,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1597,
/**/
1596,
/**/