4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
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
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
22 #if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION)
23 static const char *restart_command = NULL;
24 + static char *abs_restart_command = NULL;
26 static int found_iconic_arg = FALSE;
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);
41 if (mch_FullName((char_u *)argv[0], buf, (int)sizeof(buf), TRUE) == OK)
43 ! abs_restart_command = (char *)vim_strsave(buf);
44 ! restart_command = abs_restart_command;
55 + #if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION)
56 + vim_free(abs_restart_command);
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
66 { /* Add new patch number below this line */
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)
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 ///