]> granicus.if.org Git - vim/commitdiff
patch 8.0.0595: Coverity warning for not checking return value v8.0.0595
authorBram Moolenaar <Bram@vim.org>
Mon, 1 May 2017 12:14:04 +0000 (14:14 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 1 May 2017 12:14:04 +0000 (14:14 +0200)
Problem:    Coverity warning for not checking return value of dict_add().
Solution:   Check the return value for FAIL.

src/quickfix.c
src/version.c

index 0c97702050b2e06c2d86d26f13b5fc1c2862d7a3..7b07f9358a96a18c0d665e63c8ea7aa3f7d806d5 100644 (file)
@@ -4722,7 +4722,8 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict)
            if (di != NULL)
            {
                copy_tv(qi->qf_lists[qf_idx].qf_ctx, &di->di_tv);
-               dict_add(retdict, di);
+               if (dict_add(retdict, di) == FAIL)
+                   dictitem_free(di);
            }
        }
        else
index 6e2620d25957ec5dade243d255b81b4f6bdd3779..8895b73b0f3ace4935903706f6555d2dfd5e294e 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    595,
 /**/
     594,
 /**/