1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Freeing memory already freed, warning from static code analyzer.
12 Solution: Initialize pointers to NULL, correct use of "mustfree". (partly by
17 *** ../vim-7.3.168/src/misc1.c 2011-04-28 13:01:59.000000000 +0200
18 --- src/misc1.c 2011-04-28 17:42:00.000000000 +0200
21 if (enc_utf8 && var != NULL)
26 /* Convert from active codepage to UTF-8. Other conversions are
27 * not done, because they would fail for non-ASCII characters. */
29 if (enc_utf8 && var != NULL)
34 /* Convert from active codepage to UTF-8. Other conversions are
35 * not done, because they would fail for non-ASCII characters. */
38 * Vim's version of getenv().
39 * Special handling of $HOME, $VIM and $VIMRUNTIME.
40 * Also does ACP to 'enc' conversion for Win32.
43 vim_getenv(name, mustfree)
45 ! int *mustfree; /* set to TRUE when returned is allocated */
50 * Vim's version of getenv().
51 * Special handling of $HOME, $VIM and $VIMRUNTIME.
52 * Also does ACP to 'enc' conversion for Win32.
53 + * "mustfree" is set to TRUE when returned is allocated, it must be
54 + * initialized to FALSE by the caller.
57 vim_getenv(name, mustfree)
70 /* Convert from active codepage to UTF-8. Other conversions are
71 * not done, because they would fail for non-ASCII characters. */
78 /* Convert from active codepage to UTF-8. Other conversions are
79 * not done, because they would fail for non-ASCII characters. */
87 /* Convert from active codepage to UTF-8. Other conversions
88 * are not done, because they would fail for non-ASCII
95 /* Convert from active codepage to UTF-8. Other conversions
96 * are not done, because they would fail for non-ASCII
99 acp_to_enc(p, (int)STRLEN(p), &pp, &len);
107 acp_to_enc(p, (int)STRLEN(p), &pp, &len);
114 *** ../vim-7.3.168/src/version.c 2011-04-28 17:30:05.000000000 +0200
115 --- src/version.c 2011-04-28 17:48:04.000000000 +0200
119 { /* Add new patch number below this line */
125 A day without sunshine is like, well, night.
127 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
128 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
129 \\\ an exciting new programming language -- http://www.Zimbu.org ///
130 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///