summaryrefslogtreecommitdiff
path: root/security/keys/persistent.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/keys/persistent.c')
-rw-r--r--security/keys/persistent.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/security/keys/persistent.c b/security/keys/persistent.c
index 90303fe4a394..9944d855a28d 100644
--- a/security/keys/persistent.c
+++ b/security/keys/persistent.c
@@ -84,6 +84,7 @@ static long key_get_persistent(struct user_namespace *ns, kuid_t uid,
long ret;
/* Look in the register if it exists */
+ memset(&index_key, 0, sizeof(index_key));
index_key.type = &key_type_keyring;
index_key.description = buf;
index_key.desc_len = sprintf(buf, "_persistent.%u", from_kuid(ns, uid));