1
0
forked from aniani/vim

patch 7.4.2083

Problem:    Coverity complains about not restoring a value.
Solution:   Restore the value, although it's not really needed.  Change return
            to jump to cleanup, might leak memory.
This commit is contained in:
Bram Moolenaar
2016-07-20 22:11:06 +02:00
parent 397eadbe25
commit 19df5cc04d
2 changed files with 6 additions and 1 deletions

View File

@@ -199,14 +199,17 @@ get_function_args(
break;
}
if (newargs != NULL && ga_grow(newargs, 1) == FAIL)
return FAIL;
goto err_ret;
if (newargs != NULL)
{
c = *p;
*p = NUL;
arg = vim_strsave(arg);
if (arg == NULL)
{
*p = c;
goto err_ret;
}
/* Check for duplicate argument name. */
for (i = 0; i < newargs->ga_len; ++i)