summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.2.035
blob: e8c73915adb0d4b3d6200e2f29d1c67b6e7c18c5 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
To: vim-dev@vim.org
Subject: Patch 7.2.035
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.035
Problem:    Mismatches between alloc/malloc, free/vim_free,
	    realloc/vim_realloc.
Solution:   Use the right function. (Dominique Pelle)
Files:	    src/gui_x11.c, src/mbyte.c, src/misc2.c, src/os_unix.c


*** ../vim-7.2.034/src/gui_x11.c	Fri Jun 20 11:59:25 2008
--- src/gui_x11.c	Wed Nov 12 11:47:03 2008
***************
*** 2450,2456 ****
  	*colorPtr = colortable[closest];
      }
  
!     free(colortable);
      return OK;
  }
  
--- 2450,2456 ----
  	*colorPtr = colortable[closest];
      }
  
!     vim_free(colortable);
      return OK;
  }
  
*** ../vim-7.2.034/src/mbyte.c	Sat Sep  6 16:44:06 2008
--- src/mbyte.c	Wed Nov 12 11:24:14 2008
***************
*** 5384,5390 ****
  			draw_feedback = (char *)alloc(draw_data->chg_first
  							      + text->length);
  		    else
! 			draw_feedback = realloc(draw_feedback,
  					 draw_data->chg_first + text->length);
  		    if (draw_feedback != NULL)
  		    {
--- 5384,5390 ----
  			draw_feedback = (char *)alloc(draw_data->chg_first
  							      + text->length);
  		    else
! 			draw_feedback = vim_realloc(draw_feedback,
  					 draw_data->chg_first + text->length);
  		    if (draw_feedback != NULL)
  		    {
*** ../vim-7.2.034/src/misc2.c	Sat Sep  6 16:44:06 2008
--- src/misc2.c	Wed Nov 12 11:42:51 2008
***************
*** 873,879 ****
  	    /* 3. check for available memory: call mch_avail_mem() */
  	    if (mch_avail_mem(TRUE) < KEEP_ROOM && !releasing)
  	    {
! 		vim_free((char *)p);	/* System is low... no go! */
  		p = NULL;
  	    }
  	    else
--- 873,879 ----
  	    /* 3. check for available memory: call mch_avail_mem() */
  	    if (mch_avail_mem(TRUE) < KEEP_ROOM && !releasing)
  	    {
! 		free((char *)p);	/* System is low... no go! */
  		p = NULL;
  	    }
  	    else
*** ../vim-7.2.034/src/os_unix.c	Wed Aug  6 18:45:01 2008
--- src/os_unix.c	Wed Nov 12 11:55:33 2008
***************
*** 2905,2911 ****
       * Ignore any errors.
       */
  #if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
!     signal_stack = malloc(SIGSTKSZ);
      init_signal_stack();
  #endif
  }
--- 2905,2911 ----
       * Ignore any errors.
       */
  #if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
!     signal_stack = (char *)alloc(SIGSTKSZ);
      init_signal_stack();
  #endif
  }
***************
*** 6814,6820 ****
      if (xsmp_icefd != -1)
      {
  	SmcCloseConnection(xsmp.smcconn, 0, NULL);
! 	vim_free(xsmp.clientid);
  	xsmp.clientid = NULL;
  	xsmp_icefd = -1;
      }
--- 6815,6822 ----
      if (xsmp_icefd != -1)
      {
  	SmcCloseConnection(xsmp.smcconn, 0, NULL);
! 	if (xsmp.clientid != NULL)
! 	    free(xsmp.clientid);
  	xsmp.clientid = NULL;
  	xsmp_icefd = -1;
      }
*** ../vim-7.2.034/src/version.c	Wed Nov 12 12:51:38 2008
--- src/version.c	Wed Nov 12 13:05:40 2008
***************
*** 678,679 ****
--- 678,681 ----
  {   /* Add new patch number below this line */
+ /**/
+     35,
  /**/

-- 
You can tune a file system, but you can't tuna fish
							-- man tunefs

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///