[apparmor] [PATCH 1/3] parser: Use free_cod_entries() when merging file entries

Steve Beattie steve at nxnw.org
Wed Sep 11 10:03:14 UTC 2013


On Wed, Sep 11, 2013 at 01:42:30AM -0700, Tyler Hicks wrote:
> Reuse free_cod_entries() when freeing merged file entries in
> process_file_entries().
> 
> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>

Nice catch. This actually fixes one of the memory leaks that I had not
yet seen and tracked down because the valgrind run took too long. You
can see get caught in action by doing the following (without and with
your patch applied):

  cd parser ; make clean all && make -C tst gen_xtrans
  valgrind --leak-check=full ./apparmor_parser -Q -I tst/simple_tests tst/simple_tests/xtrans/simple_bad_x_mods_first_35.sd

Acked-by: Steve Beattie <steve at nxnw.org>

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130911/1efa0dc1/attachment.pgp>


More information about the AppArmor mailing list