The patch titled selinux: fix memory leak has been added to the -mm tree. Its filename is selinux-fix-memory-leak.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: selinux: fix memory leak From: Darrel Goeddel <dgoeddel@xxxxxxxxxxxxx> This patch fixes a memory leak when a policydb structure is destroyed. Signed-off-by: Darrel Goeddel <dgoeddel@xxxxxxxxxxxxx> Signed-off-by: Stephen Smalley <sds@xxxxxxxxxxxxx> Acked-by: James Morris <jmorris@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- security/selinux/ss/policydb.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff -puN security/selinux/ss/policydb.c~selinux-fix-memory-leak security/selinux/ss/policydb.c --- a/security/selinux/ss/policydb.c~selinux-fix-memory-leak +++ a/security/selinux/ss/policydb.c @@ -644,10 +644,18 @@ void policydb_destroy(struct policydb *p kfree(lra); for (rt = p->range_tr; rt; rt = rt -> next) { - kfree(lrt); + if (lrt) { + ebitmap_destroy(&lrt->range.level[0].cat); + ebitmap_destroy(&lrt->range.level[1].cat); + kfree(lrt); + } lrt = rt; } - kfree(lrt); + if (lrt) { + ebitmap_destroy(&lrt->range.level[0].cat); + ebitmap_destroy(&lrt->range.level[1].cat); + kfree(lrt); + } if (p->type_attr_map) { for (i = 0; i < p->p_types.nprim; i++) _ Patches currently in -mm which might be from dgoeddel@xxxxxxxxxxxxx are selinux-fix-memory-leak.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html