aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/avtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/ss/avtab.c')
-rw-r--r--security/selinux/ss/avtab.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c
index ebb993c5c244..9142073319c0 100644
--- a/security/selinux/ss/avtab.c
+++ b/security/selinux/ss/avtab.c
@@ -36,10 +36,9 @@ avtab_insert_node(struct avtab *h, int hvalue,
36 struct avtab_key *key, struct avtab_datum *datum) 36 struct avtab_key *key, struct avtab_datum *datum)
37{ 37{
38 struct avtab_node * newnode; 38 struct avtab_node * newnode;
39 newnode = kmem_cache_alloc(avtab_node_cachep, GFP_KERNEL); 39 newnode = kmem_cache_zalloc(avtab_node_cachep, GFP_KERNEL);
40 if (newnode == NULL) 40 if (newnode == NULL)
41 return NULL; 41 return NULL;
42 memset(newnode, 0, sizeof(struct avtab_node));
43 newnode->key = *key; 42 newnode->key = *key;
44 newnode->datum = *datum; 43 newnode->datum = *datum;
45 if (prev) { 44 if (prev) {