Dominique Pelle wrote:
> While testing Vim with Valgrind memory checker, > I encountered this memory leak: > > ==6498== 183 bytes in 4 blocks are definitely lost in loss record 31 of 43 > ==6498== at 0x4022765: malloc (vg_replace_malloc.c:149) > ==6498== by 0x8113B58: lalloc (misc2.c:862) > ==6498== by 0x8093F03: make_filter_cmd (ex_cmds.c:1528) > ==6498== by 0x809382E: do_filter (ex_cmds.c:1163) > ==6498== by 0x809357D: do_bang (ex_cmds.c:1031) > ==6498== by 0x80AE8F5: ex_bang (ex_docmd.c:8335) > ==6498== by 0x80A5BDE: do_one_cmd (ex_docmd.c:2623) > ==6498== by 0x80A342A: do_cmdline (ex_docmd.c:1099) > ==6498== by 0x80A2956: do_exmode (ex_docmd.c:656) > ==6498== by 0x8129EAB: nv_exmode (normal.c:5137) > ==6498== by 0x8123542: normal_cmd (normal.c:1152) > ==6498== by 0x80E6371: main_loop (main.c:1181) > ==6498== by 0x80E5EC1: main (main.c:940) > > Unfortunately, I'm not sure how to reproduce it. But looking > at the code, it is clear that there is one path where memory > is not freed. It probably happens when the 'modifiable' option is off. > In ex_cmds.c below, local variable cmd_buf is allocated > at line 1163, then freed later at line 1202. But in between, > line 1183 may do "goto error;" which will cause to return > without freeing local variable cmd_buf. Thanks for the patch, I'll include it. -- hundred-and-one symptoms of being an internet addict: 244. You use more than 20 passwords. /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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 /// --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
