]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.318
- typo
[packages/vim.git] / 7.1.318
1 To: vim-dev@vim.org
2 Subject: Patch 7.1.318
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.1.318
11 Problem:    Memory leak when closing xsmp connection.  Crash on exit when
12             using Lesstif.
13 Solution:   Don't close the X display to work around a Lesstif bug.  Free
14             clientid.  Also fix a leak for Motif and Athena. (Dominique Pelle)
15 Files:      src/gui_x11.c, src/os_unix.c
16
17
18 *** ../vim-7.1.317/src/gui_x11.c        Thu May 10 21:11:45 2007
19 --- src/gui_x11.c       Sun Jun  8 17:13:45 2008
20 ***************
21 *** 1538,1545 ****
22 --- 1538,1548 ----
23       attr.depth = DefaultDepthOfScreen(scr);
24   
25       if (!icon)
26 +     {
27         XpmCreatePixmapFromData(dsp, root_window, magick, &icon,
28                                                            &icon_mask, &attr);
29 +       XpmFreeAttributes(&attr);
30 +     }
31   
32   # ifdef FEAT_GUI_ATHENA
33       XtVaSetValues(vimShell, XtNiconPixmap, icon, XtNiconMask, icon_mask, NULL);
34 *** ../vim-7.1.317/src/os_unix.c        Wed May  7 19:05:55 2008
35 --- src/os_unix.c       Tue Jun 17 21:03:54 2008
36 ***************
37 *** 209,214 ****
38 --- 209,215 ----
39   {
40       SmcConn smcconn;      /* The SM connection ID */
41       IceConn iceconn;      /* The ICE connection ID */
42 +     char *clientid;         /* The client ID for the current smc session */
43       Bool save_yourself;     /* If we're in the middle of a save_yourself */
44       Bool shutdown;        /* If we're in shutdown mode */
45   } xsmp_config_T;
46 ***************
47 *** 2887,2902 ****
48       if (clip_plus.owned)
49         clip_lose_selection(&clip_plus);
50   # endif
51 ! # if (defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)) || defined(PROTO)
52       if (xterm_Shell != (Widget)0)
53         XtDestroyWidget(xterm_Shell);
54       if (xterm_dpy != NULL)
55         XtCloseDisplay(xterm_dpy);
56       if (app_context != (XtAppContext)NULL)
57         XtDestroyApplicationContext(app_context);
58   # endif
59   # ifdef FEAT_X11
60 !     if (x11_display != NULL && x11_display != xterm_dpy)
61         XCloseDisplay(x11_display);
62   # endif
63   # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
64 --- 2893,2920 ----
65       if (clip_plus.owned)
66         clip_lose_selection(&clip_plus);
67   # endif
68 ! # if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
69       if (xterm_Shell != (Widget)0)
70         XtDestroyWidget(xterm_Shell);
71 + #  ifndef LESSTIF_VERSION
72 +     /* Lesstif crashes here, lose some memory */
73       if (xterm_dpy != NULL)
74         XtCloseDisplay(xterm_dpy);
75       if (app_context != (XtAppContext)NULL)
76 +     {
77         XtDestroyApplicationContext(app_context);
78 + #   ifdef FEAT_X11
79 +       x11_display = NULL; /* freed by XtDestroyApplicationContext() */
80 + #   endif
81 +     }
82 + #  endif
83   # endif
84   # ifdef FEAT_X11
85 !     if (x11_display != NULL
86 ! #  ifdef FEAT_XCLIPBOARD
87 !           && x11_display != xterm_dpy
88 ! #  endif
89 !           )
90         XCloseDisplay(x11_display);
91   # endif
92   # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
93 ***************
94 *** 6290,6311 ****
95       }
96       if (xterm_dpy != NULL)
97       {
98 ! #if 0
99         /* Lesstif and Solaris crash here, lose some memory */
100         XtCloseDisplay(xterm_dpy);
101 ! #endif
102         if (x11_display == xterm_dpy)
103             x11_display = NULL;
104         xterm_dpy = NULL;
105       }
106 ! #if 0
107       if (app_context != (XtAppContext)NULL)
108       {
109         /* Lesstif and Solaris crash here, lose some memory */
110         XtDestroyApplicationContext(app_context);
111         app_context = (XtAppContext)NULL;
112       }
113 ! #endif
114   }
115   # endif
116   
117 --- 6308,6329 ----
118       }
119       if (xterm_dpy != NULL)
120       {
121 ! #  if 0
122         /* Lesstif and Solaris crash here, lose some memory */
123         XtCloseDisplay(xterm_dpy);
124 ! #  endif
125         if (x11_display == xterm_dpy)
126             x11_display = NULL;
127         xterm_dpy = NULL;
128       }
129 ! #  if 0
130       if (app_context != (XtAppContext)NULL)
131       {
132         /* Lesstif and Solaris crash here, lose some memory */
133         XtDestroyApplicationContext(app_context);
134         app_context = (XtAppContext)NULL;
135       }
136 ! #  endif
137   }
138   # endif
139   
140 ***************
141 *** 6557,6563 ****
142   xsmp_init(void)
143   {
144       char              errorstring[80];
145 -     char              *clientid;
146       SmcCallbacks      smcallbacks;
147   #if 0
148       SmPropValue               smname;
149 --- 6575,6580 ----
150 ***************
151 *** 6599,6605 ****
152                      | SmcSaveCompleteProcMask | SmcShutdownCancelledProcMask,
153             &smcallbacks,
154             NULL,
155 !           &clientid,
156             sizeof(errorstring),
157             errorstring);
158       if (xsmp.smcconn == NULL)
159 --- 6616,6622 ----
160                      | SmcSaveCompleteProcMask | SmcShutdownCancelledProcMask,
161             &smcallbacks,
162             NULL,
163 !           &xsmp.clientid,
164             sizeof(errorstring),
165             errorstring);
166       if (xsmp.smcconn == NULL)
167 ***************
168 *** 6638,6643 ****
169 --- 6655,6662 ----
170       if (xsmp_icefd != -1)
171       {
172         SmcCloseConnection(xsmp.smcconn, 0, NULL);
173 +       vim_free(xsmp.clientid);
174 +       xsmp.clientid = NULL;
175         xsmp_icefd = -1;
176       }
177   }
178 *** ../vim-7.1.317/src/version.c        Fri Jun 20 11:39:04 2008
179 --- src/version.c       Fri Jun 20 11:56:09 2008
180 ***************
181 *** 668,669 ****
182 --- 673,676 ----
183   {   /* Add new patch number below this line */
184 + /**/
185 +     318,
186   /**/
187
188 -- 
189 hundred-and-one symptoms of being an internet addict:
190 44. Your friends no longer send you e-mail...they just log on to your IRC
191     channel.
192
193  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
194 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
195 \\\        download, build and distribute -- http://www.A-A-P.org        ///
196  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 2.55465 seconds and 3 git commands to generate.