Patch 8.1.0843
Problem:    Memory leak when running "make test_cd".
Solution:   Free the stack element when failing. (Dominique Pelle,
            closes #3877)
Files:      src/misc2.c


*** ../vim-8.1.0842/src/misc2.c 2019-01-26 17:28:22.228599112 +0100
--- src/misc2.c 2019-01-29 20:14:16.987847674 +0100
***************
*** 4657,4663 ****
--- 4657,4666 ----
                        add_pathsep(file_path);
                    }
                    else
+                   {
+                       ff_free_stack_element(stackp);
                        goto fail;
+                   }
                }
  
                /* append the fix part of the search path */
***************
*** 4667,4673 ****
--- 4670,4679 ----
                    add_pathsep(file_path);
                }
                else
+               {
+                   ff_free_stack_element(stackp);
                    goto fail;
+               }
  
  #ifdef FEAT_PATH_EXTRA
                rest_of_wildcards = stackp->ffs_wc_path;
***************
*** 4687,4693 ****
--- 4693,4702 ----
                            if (len + 1 < MAXPATHL)
                                file_path[len++] = '*';
                            else
+                           {
+                               ff_free_stack_element(stackp);
                                goto fail;
+                           }
                        }
  
                        if (*p == 0)
***************
*** 4718,4724 ****
--- 4727,4736 ----
                        if (len + 1 < MAXPATHL)
                            file_path[len++] = *rest_of_wildcards++;
                        else
+                       {
+                           ff_free_stack_element(stackp);
                            goto fail;
+                       }
  
                    file_path[len] = NUL;
                    if (vim_ispathsep(*rest_of_wildcards))
***************
*** 4787,4793 ****
--- 4799,4808 ----
                            STRCAT(file_path, search_ctx->ffsc_file_to_search);
                        }
                        else
+                       {
+                           ff_free_stack_element(stackp);
                            goto fail;
+                       }
  
                        /*
                         * Try without extra suffix and then with suffixes
*** ../vim-8.1.0842/src/version.c       2019-01-28 23:20:00.407634900 +0100
--- src/version.c       2019-01-29 20:16:07.459086752 +0100
***************
*** 785,786 ****
--- 785,788 ----
  {   /* Add new patch number below this line */
+ /**/
+     843,
  /**/

-- 
ARTHUR:  Shut up!  Will you shut up!
DENNIS:  Ah, now we see the violence inherent in the system.
ARTHUR:  Shut up!
DENNIS:  Oh!  Come and see the violence inherent in the system!
         HELP! HELP!  I'm being repressed!
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui