Patch 8.2.3931

4 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 29, 2021, 7:00:43 AM12/29/21
to vim...@googlegroups.com

Patch 8.2.3931
Problem: Coverity reports a memory leak.
Solution: Free memory in case of failure.
Files: src/diff.c


*** ../vim-8.2.3930/src/diff.c 2021-12-28 18:29:28.633385576 +0000
--- src/diff.c 2021-12-29 11:53:15.684500439 +0000
***************
*** 3310,3316 ****
--- 3310,3319 ----
return -1;

if (ga_grow(&dout->dout_ga, 1) == FAIL)
+ {
+ vim_free(p);
return -1;
+ }

p->lnum_orig = start_a + 1;
p->count_orig = count_a;
*** ../vim-8.2.3930/src/version.c 2021-12-28 20:59:51.979937080 +0000
--- src/version.c 2021-12-29 11:59:43.239831432 +0000
***************
*** 751,752 ****
--- 751,754 ----
{ /* Add new patch number below this line */
+ /**/
+ 3931,
/**/

--
hundred-and-one symptoms of being an internet addict:
134. You consider bandwidth to be more important than carats.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages