summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0843
blob: 7689fa2cfad03d6a335453fc625dfe6cb65d1e55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0843
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

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 -- Bram@Moolenaar.net -- 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    ///