To: vim_dev@googlegroups.com Subject: Patch 8.2.4624 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///