Patch 8.2.4624

6 views
Skip to first unread message

Bram Moolenaar

unread,
Mar 25, 2022, 10:47:21 AM3/25/22
to vim...@googlegroups.com

Patch 8.2.4624
Problem: Old Coverity warning for resource leak.
Solution: Close the file if memory allocation fails.
Files: src/diff.c


*** ../vim-8.2.4623/src/diff.c 2022-01-05 20:24:34.268005660 +0000
--- src/diff.c 2022-03-25 14:45:49.401982598 +0000
***************
*** 1662,1668 ****
--- 1662,1672 ----
{
hunk = ALLOC_ONE(diffhunk_T);
if (hunk == NULL)
+ {
+ if (fd != NULL)
+ fclose(fd);
return;
+ }
}

for (;;)
*** ../vim-8.2.4623/src/version.c 2022-03-25 14:39:47.539311901 +0000
--- src/version.c 2022-03-25 14:46:33.129840125 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4624,
/**/

--
WOMAN: Dennis, there's some lovely filth down here. Oh -- how d'you do?
ARTHUR: How do you do, good lady. I am Arthur, King of the Britons.
Who's castle is that?
WOMAN: King of the who?
The Quest for the Holy Grail (Monty Python)

/// 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