Dominique Pelle wrote:

> Valgrind memory checker detects the following memory leak:
> 
> ==2410== 272 (56 direct, 216 indirect) bytes in 1 blocks are
> definitely lost in loss record 2>
> ==2410==    at 0x4C21FEB: malloc (vg_replace_malloc.c:207)
> ==2410==    by 0x6F7548A: (within /lib64/libacl.so.1.1.0)
> ==2410==    by 0x6F73EE6: (within /lib64/libacl.so.1.1.0)
> ==2410==    by 0x6F746F1: acl_from_mode (in /lib64/libacl.so.1.1.0)
> ==2410==    by 0x6F73D2F: acl_get_file (in /lib64/libacl.so.1.1.0)
> ==2410==    by 0x50FFDC: mch_get_acl (os_unix.c:2658)
> ==2410==    by 0x4895C5: vim_rename (fileio.c:6163)
> ==2410==    by 0x4B58A2: ml_setname (memline.c:467)
> ==2410==    by 0x4123CE: buf_name_changed (buffer.c:2698)
> ==2410==    by 0x4122FE: setfname (buffer.c:2657)
> ==2410==    by 0x453DE7: ex_file (ex_cmds.c:2464)
> ==2410==    by 0x465179: do_one_cmd (ex_docmd.c:2621)
> ==2410==    by 0x462959: do_cmdline (ex_docmd.c:1095)
> ==2410==    by 0x4EDE83: nv_colon (normal.c:5181)
> ==2410==    by 0x4E6E73: normal_cmd (normal.c:1152)
> ==2410==    by 0x4A73A1: main_loop (main.c:1177)
> ==2410==    by 0x4A6EED: main (main.c:936)
> 
> 
> I can reproduce it with "Vim-7.2a BETA" (huge) built with libacl and using
> a file system mounted with acl option on Linux x86_64.
> 
> Here is how I can reproduce it 100% of the time (there might be other ways):
> 
> 1/ Start Vim with Valgrind:
> 
>      $ valgrind --leak-check=yes vim -u NONE /tmp/foo 2> vg.log
> 
> 2/ Change the file name to a location on a filesystem mounted with acl and 
> where
>    you don't have write permission (/ for example for me):
> 
>    :file /foo
> 
>    For me, / is the following filesystem (note the acl mount option)
> 
>       /dev/sda2 on / type reiserfs (rw,acl,user_xattr)
> 
> 3/ Quit Vim :q and observe in vg.log that Valgrind detected a leak (as
>    many leaks as ":file /foo" command was entered)
> 
> I attach a patch which fixes it.

Thanks, I'll include it.

-- 
I AM THANKFUL...
...for the clothes that fit a little too snug because it
means I have more than enough to eat.

 /// 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
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui