comparison src/tag.c @ 30061:f4a7831fa352 v9.0.0368

patch 9.0.0368: old Coverity warning for using NULL pointer Commit: https://github.com/vim/vim/commit/89083466fa565bea22832687ec5fe89a70a3b8f7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 3 12:59:19 2022 +0100 patch 9.0.0368: old Coverity warning for using NULL pointer Problem: Old Coverity warning for using NULL pointer. Solution: Bail out if dictionary allocation fails.
author Bram Moolenaar <Bram@vim.org>
date Sat, 03 Sep 2022 14:00:04 +0200
parents f5cbf8a4043d
children 0e9b58353412
comparison
equal deleted inserted replaced
30060:4d69338df279 30061:f4a7831fa352
4382 vim_free(matches[i]); 4382 vim_free(matches[i]);
4383 continue; 4383 continue;
4384 } 4384 }
4385 4385
4386 if ((dict = dict_alloc()) == NULL) 4386 if ((dict = dict_alloc()) == NULL)
4387 {
4387 ret = FAIL; 4388 ret = FAIL;
4389 vim_free(matches[i]);
4390 break;
4391 }
4388 if (list_append_dict(list, dict) == FAIL) 4392 if (list_append_dict(list, dict) == FAIL)
4389 ret = FAIL; 4393 ret = FAIL;
4390 4394
4391 full_fname = tag_full_fname(&tp); 4395 full_fname = tag_full_fname(&tp);
4392 if (add_tag_field(dict, "name", tp.tagname, tp.tagname_end) == FAIL 4396 if (add_tag_field(dict, "name", tp.tagname, tp.tagname_end) == FAIL