summaryrefslogtreecommitdiffstats
path: root/security/apparmor/match.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2013-02-18 16:04:34 -0800
committerJohn Johansen <john.johansen@canonical.com>2013-04-28 00:36:09 -0700
commit0ca554b9fca425eb58325a36290deef698cef34b (patch)
treeaa9cd7544db53f617f8bf6b0e441f97a55ed4181 /security/apparmor/match.c
parent3cfcc19e0b5390c04cb5bfa4e8fde39395410e61 (diff)
downloadop-kernel-dev-0ca554b9fca425eb58325a36290deef698cef34b.zip
op-kernel-dev-0ca554b9fca425eb58325a36290deef698cef34b.tar.gz
apparmor: add kvzalloc to handle zeroing for kvmalloc
Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Steve Beattie <sbeattie@ubuntu.com>
Diffstat (limited to 'security/apparmor/match.c')
-rw-r--r--security/apparmor/match.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/match.c b/security/apparmor/match.c
index 90971a8..dfd25a9 100644
--- a/security/apparmor/match.c
+++ b/security/apparmor/match.c
@@ -30,7 +30,7 @@
*
* Returns: pointer to table else NULL on failure
*
- * NOTE: must be freed by kvfree (not kmalloc)
+ * NOTE: must be freed by kvfree (not kfree)
*/
static struct table_header *unpack_table(char *blob, size_t bsize)
{
@@ -57,7 +57,7 @@ static struct table_header *unpack_table(char *blob, size_t bsize)
if (bsize < tsize)
goto out;
- table = kvmalloc(tsize);
+ table = kvzalloc(tsize);
if (table) {
*table = th;
if (th.td_flags == YYTD_DATA8)
OpenPOWER on IntegriCloud