summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0148
blob: 60e8ef0a50c2a2d1da5a7092a1c3baef279eaee1 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0148
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.0148
Problem:    Memory leak when using :tcl expr command.
Solution:   Free the result of expression evaluation. (Dominique Pelle,
            closes #3150)
Files:	    src/if_tcl.c


*** ../vim-8.1.0147/src/if_tcl.c	2017-09-16 19:58:18.000000000 +0200
--- src/if_tcl.c	2018-07-04 22:09:29.189322096 +0200
***************
*** 1385,1391 ****
--- 1385,1394 ----
      if (str == NULL)
  	Tcl_SetResult(interp, _("invalid expression"), TCL_STATIC);
      else
+     {
  	Tcl_SetResult(interp, str, TCL_VOLATILE);
+ 	vim_free(str);
+     }
      err = vimerror(interp);
  #else
      Tcl_SetResult(interp, _("expressions disabled at compile time"), TCL_STATIC);
*** ../vim-8.1.0147/src/version.c	2018-07-04 22:03:22.110919832 +0200
--- src/version.c	2018-07-04 22:08:39.721556114 +0200
***************
*** 791,792 ****
--- 791,794 ----
  {   /* Add new patch number below this line */
+ /**/
+     148,
  /**/

-- 
Rule #1: Don't give somebody a tool that he's going to hurt himself with.

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