Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9a11a189 authored by Eric Richter's avatar Eric Richter Committed by Mimi Zohar
Browse files

ima: fix memory leak in ima_release_policy



When the "policy" securityfs file is opened for read, it is opened as a
sequential file. However, when it is eventually released, there is no
cleanup for the sequential file, therefore some memory is leaked.

This patch adds a call to seq_release() in ima_release_policy() to clean up
the memory when the file is opened for read.

Fixes: 80eae209 IMA: allow reading back the current policy
Reported-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarEric Richter <erichte@linux.vnet.ibm.com>
Tested-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
parent 185c0f26
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment