]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.195
- new
[packages/vim.git] / 7.2.195
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.195
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.2.195
11 Problem:    Leaking memory for the command Vim was started with.
12 Solution:   Remember the pointer and free it.
13 Files:      src/gui_gtk_x11.c
14
15
16 *** ../vim-7.2.194/src/gui_gtk_x11.c    2009-05-17 16:23:20.000000000 +0200
17 --- src/gui_gtk_x11.c   2009-06-03 12:44:31.000000000 +0200
18 ***************
19 *** 412,417 ****
20 --- 412,418 ----
21   #endif
22   #if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION)
23   static const char *restart_command = NULL;
24 + static       char *abs_restart_command = NULL;
25   #endif
26   static int found_iconic_arg = FALSE;
27   
28 ***************
29 *** 449,456 ****
30         char_u buf[MAXPATHL];
31   
32         if (mch_FullName((char_u *)argv[0], buf, (int)sizeof(buf), TRUE) == OK)
33 !           /* Tiny leak; doesn't matter, and usually we don't even get here */
34 !           restart_command = (char *)vim_strsave(buf);
35       }
36   #endif
37   
38 --- 450,459 ----
39         char_u buf[MAXPATHL];
40   
41         if (mch_FullName((char_u *)argv[0], buf, (int)sizeof(buf), TRUE) == OK)
42 !       {
43 !           abs_restart_command = (char *)vim_strsave(buf);
44 !           restart_command = abs_restart_command;
45 !       }
46       }
47   #endif
48   
49 ***************
50 *** 611,616 ****
51 --- 614,622 ----
52   gui_mch_free_all()
53   {
54       vim_free(gui_argv);
55 + #if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION)
56 +     vim_free(abs_restart_command);
57 + #endif
58   }
59   #endif
60   
61 *** ../vim-7.2.194/src/version.c        2009-06-03 15:05:05.000000000 +0200
62 --- src/version.c       2009-06-03 16:19:00.000000000 +0200
63 ***************
64 *** 678,679 ****
65 --- 678,681 ----
66   {   /* Add new patch number below this line */
67 + /**/
68 +     195,
69   /**/
70
71 -- 
72 I think that you'll agree that engineers are very effective in their social
73 interactions.  It's the "normal" people who are nuts.
74                                 (Scott Adams - The Dilbert principle)
75
76  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
77 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
78 \\\        download, build and distribute -- http://www.A-A-P.org        ///
79  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.035657 seconds and 3 git commands to generate.