Google
  Web www.spinics.net

memory leaks tests (Re: [PATCH] Fix a potential memory leak at mnt_table_parse_dir)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Fri, Jan 20, 2012 at 01:00:34PM +0900, Masatake YAMATO wrote:
> mnt_table_parse_dir in libmount/src/tab_parse.c calls
> scandir, and then opendir. When the latter one, opendir is failed, 
> buffers allocated in scandir are not released.

 Thanks, I'll apply the patch.

 BTW, it's possible to compile some test binaries by:

    make -C libmount/src tests

 these programs are used in tests/ts/libmount regression tests.

 It would be nice to add valgrind (or so) to the tests and check for
 mem-leaks. (Ideally add some simple infrastructure to tests/functions.sh
 and log valgrind output to "$TS_OUTPUT.mem".)  Volunteer? ;-)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Site Home]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Memory]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Rubini]     [Photo]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]     [Linux Resources]

Powered by Linux