components/vim/vim72-patches/7.2.271
changeset 379 c6a17bba1da3
parent 378 f0b61ed1d10d
child 380 e92b3b4a1c66
equal deleted inserted replaced
378:f0b61ed1d10d 379:c6a17bba1da3
     1 To: [email protected]
       
     2 Subject: Patch 7.2.271
       
     3 Fcc: outbox
       
     4 From: Bram Moolenaar <[email protected]>
       
     5 Mime-Version: 1.0
       
     6 Content-Type: text/plain; charset=UTF-8
       
     7 Content-Transfer-Encoding: 8bit
       
     8 ------------
       
     9 
       
    10 Patch 7.2.271
       
    11 Problem:    Using freed memory in Motif GUI version when making a choice.
       
    12 Solution:   Free memory only after using it. (Dominique Pelle)
       
    13 Files:	    src/gui_xmdlg.c
       
    14 
       
    15 
       
    16 *** ../vim-7.2.270/src/gui_xmdlg.c	2009-05-21 23:25:38.000000000 +0200
       
    17 --- src/gui_xmdlg.c	2009-10-28 21:56:15.000000000 +0100
       
    18 ***************
       
    19 *** 10,16 ****
       
    20   /*
       
    21    * (C) 2001,2005 by Marcin Dalecki <[email protected]>
       
    22    *
       
    23 !  * Implementation of dialogue functions for the Motif GUI variant.
       
    24    *
       
    25    * Note about Lesstif: Apparently lesstif doesn't get the widget layout right,
       
    26    * when using a dynamic scrollbar policy.
       
    27 --- 10,16 ----
       
    28   /*
       
    29    * (C) 2001,2005 by Marcin Dalecki <[email protected]>
       
    30    *
       
    31 !  * Implementation of dialog functions for the Motif GUI variant.
       
    32    *
       
    33    * Note about Lesstif: Apparently lesstif doesn't get the widget layout right,
       
    34    * when using a dynamic scrollbar policy.
       
    35 ***************
       
    36 *** 633,648 ****
       
    37   	data->sel[which] = XtNewString(sel);
       
    38       else
       
    39       {
       
    40 - 	XtFree(data->sel[which]);
       
    41   	if (!strcmp(data->sel[which], sel))
       
    42   	{
       
    43   	    /* unselecting current selection */
       
    44   	    data->sel[which] = NULL;
       
    45   	    if (w)
       
    46   		XmListDeselectItem(w, call_data->item);
       
    47   	}
       
    48   	else
       
    49   	    data->sel[which] = XtNewString(sel);
       
    50       }
       
    51       XtFree(sel);
       
    52   
       
    53 --- 633,651 ----
       
    54   	data->sel[which] = XtNewString(sel);
       
    55       else
       
    56       {
       
    57   	if (!strcmp(data->sel[which], sel))
       
    58   	{
       
    59   	    /* unselecting current selection */
       
    60 + 	    XtFree(data->sel[which]);
       
    61   	    data->sel[which] = NULL;
       
    62   	    if (w)
       
    63   		XmListDeselectItem(w, call_data->item);
       
    64   	}
       
    65   	else
       
    66 + 	{
       
    67 + 	    XtFree(data->sel[which]);
       
    68   	    data->sel[which] = XtNewString(sel);
       
    69 + 	}
       
    70       }
       
    71       XtFree(sel);
       
    72   
       
    73 *** ../vim-7.2.270/src/version.c	2009-11-03 12:38:50.000000000 +0100
       
    74 --- src/version.c	2009-11-03 12:48:26.000000000 +0100
       
    75 ***************
       
    76 *** 678,679 ****
       
    77 --- 678,681 ----
       
    78   {   /* Add new patch number below this line */
       
    79 + /**/
       
    80 +     271,
       
    81   /**/
       
    82 
       
    83 -- 
       
    84 ROBIN:  (warily) And if you get a question wrong?
       
    85 ARTHUR: You are cast into the Gorge of Eternal Peril.
       
    86 ROBIN:  Oh ... wacho!
       
    87                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
       
    88 
       
    89  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
       
    90 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
       
    91 \\\        download, build and distribute -- http://www.A-A-P.org        ///
       
    92  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///