ima: free duplicate measurement memory
commit45d08c973d529ac48022b25ad47e5a7044bff116
authorRoberto Sassu <roberto.sassu@polito.it>
Mon, 19 Dec 2011 14:57:27 +0000 (19 15:57 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 25 Jan 2012 21:53:20 +0000 (25 13:53 -0800)
treeb12167cc746b5ac3cc2bef7d50dbc61f4c73914c
parent76f494aa33a8785d494c4f31fb1d348d44b26288
ima: free duplicate measurement memory

commit 45fae7493970d7c45626ccd96d4a74f5f1eea5a9 upstream.

Info about new measurements are cached in the iint for performance.  When
the inode is flushed from cache, the associated iint is flushed as well.
Subsequent access to the inode will cause the inode to be re-measured and
will attempt to add a duplicate entry to the measurement list.

This patch frees the duplicate measurement memory, fixing a memory leak.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
security/integrity/ima/ima_api.c
security/integrity/ima/ima_queue.c