Yegappan wrote:

> Running the latest Vim under valgrind reports the following memory leak:
> 
> ==608== 2 bytes in 2 blocks are definitely lost in loss record 2 of 27
> ==608==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
> ==608==    by 0x4F2DAA: lalloc (misc2.c:976)
> ==608==    by 0x4F2C76: alloc (misc2.c:874)
> ==608==    by 0x4F3253: vim_strsave (misc2.c:1315)
> ==608==    by 0x5297FC: set_string_option_direct (option.c:5926)
> ==608==    by 0x525640: set_option_default (option.c:3811)
> ==608==    by 0x5258E6: set_options_default (option.c:3887)
> ==608==    by 0x525178: set_init_1 (option.c:3567)
> ==608==    by 0x6438EE: common_init (main.c:1030)
> ==608==    by 0x642B13: main (main.c:180)
> ==608==
> 
> To reproduce this, start Vim under valgrind and then exit Vim.

This is because 'termkey' and 'termsize' are currently duplicated, while
we are switching over to 'termwinkey' and 'termwinsize'.

I'll add some code to avoid it.

-- 
Edison's greatest achievement came in 1879, when he invented the
electric company.  Edison's design was a brilliant adaptation of the
simple electrical circuit: the electric company sends electricity
through a wire to a customer, then immediately gets the electricity
back through another wire

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui