Skip to content

Commit beb9cb1

Browse files
committed
patch 8.0.0595: Coverity warning for not checking return value
Problem: Coverity warning for not checking return value of dict_add(). Solution: Check the return value for FAIL.
1 parent 66c0e70 commit beb9cb1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/quickfix.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4722,7 +4722,8 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict)
47224722
if (di != NULL)
47234723
{
47244724
copy_tv(qi->qf_lists[qf_idx].qf_ctx, &di->di_tv);
4725-
dict_add(retdict, di);
4725+
if (dict_add(retdict, di) == FAIL)
4726+
dictitem_free(di);
47264727
}
47274728
}
47284729
else

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
595,
767769
/**/
768770
594,
769771
/**/

0 commit comments

Comments
 (0)