Patch 8.2.4625
Problem:    Old Coverity warning for resource leak.
Solution:   Call FreeWild() if expanding matches did not fail.
Files:      src/help.c


*** ../vim-8.2.4624/src/help.c  2022-01-31 14:59:33.518943700 +0000
--- src/help.c  2022-03-25 14:52:47.152717397 +0000
***************
*** 947,952 ****
--- 947,953 ----
      FILE      *fd_tags;
      FILE      *fd;
      garray_T  ga;
+     int               res;
      int               filecount;
      char_u    **files;
      char_u    *p1, *p2;
***************
*** 965,976 ****
      STRCPY(NameBuff, dir);
      STRCAT(NameBuff, "/**/*");
      STRCAT(NameBuff, ext);
!     if (gen_expand_wildcards(1, &NameBuff, &filecount, &files,
!                                                   EW_FILE|EW_SILENT) == FAIL
!           || filecount == 0)
      {
        if (!got_int)
            semsg(_(e_no_match_str_1), NameBuff);
        return;
      }
  
--- 966,979 ----
      STRCPY(NameBuff, dir);
      STRCAT(NameBuff, "/**/*");
      STRCAT(NameBuff, ext);
!     res = gen_expand_wildcards(1, &NameBuff, &filecount, &files,
!                                                           EW_FILE|EW_SILENT);
!     if (res == FAIL || filecount == 0)
      {
        if (!got_int)
            semsg(_(e_no_match_str_1), NameBuff);
+       if (res != FAIL)
+           FreeWild(filecount, files);
        return;
      }
  
*** ../vim-8.2.4624/src/version.c       2022-03-25 14:46:43.957805290 +0000
--- src/version.c       2022-03-25 14:53:27.440604071 +0000
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4625,
  /**/

-- 
`When any government, or any church for that matter, undertakes to say to
 its subjects, "This you may not read, this you must not see, this you are
 forbidden to know," the end result is tyranny and oppression no matter how
 holy the motives' -- Robert A Heinlein, "If this goes on --"

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220325145445.ABD111C0C1F%40moolenaar.net.

Raspunde prin e-mail lui