]> granicus.if.org Git - vim/commitdiff
patch 7.4.2083 v7.4.2083
authorBram Moolenaar <Bram@vim.org>
Wed, 20 Jul 2016 20:11:06 +0000 (22:11 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 20 Jul 2016 20:11:06 +0000 (22:11 +0200)
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.

src/userfunc.c
src/version.c

index 9ffafc3714f4e97b3b5baa282c5fb79cc7171465..ffbbc2d21f754e9e81b8092c8b30fdd334cdcb64 100644 (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)
index acc5c33d1102e3c2e46055ad0aa0db725f039367..69da1192103f481e16027487d350b1341e5357ac 100644 (file)
@@ -758,6 +758,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2083,
 /**/
     2082,
 /**/