aboutsummaryrefslogtreecommitdiff
path: root/security/keys/gc.c
diff options
context:
space:
mode:
authorGravatar David S. Miller <davem@davemloft.net> 2015-01-15 00:53:17 -0500
committerGravatar David S. Miller <davem@davemloft.net> 2015-01-15 00:53:17 -0500
commit3f3558bb512e0762d5a4573a4aaf038d7a616e92 (patch)
tree1e2b43d410093e949209ca33614f5cdfdd16e80e /security/keys/gc.c
parentipv6:icmp:remove unnecessary brackets (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff)
downloadlinux-3f3558bb512e0762d5a4573a4aaf038d7a616e92.tar.gz
linux-3f3558bb512e0762d5a4573a4aaf038d7a616e92.tar.bz2
linux-3f3558bb512e0762d5a4573a4aaf038d7a616e92.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/xen-netfront.c Minor overlapping changes in xen-netfront.c, mostly to do with some buffer management changes alongside the split of stats into TX and RX. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security/keys/gc.c')
-rw-r--r--security/keys/gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/keys/gc.c b/security/keys/gc.c
index 9609a7f0faea..c7952375ac53 100644
--- a/security/keys/gc.c
+++ b/security/keys/gc.c
@@ -148,12 +148,12 @@ static noinline void key_gc_unused_keys(struct list_head *keys)
if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags))
atomic_dec(&key->user->nikeys);
- key_user_put(key->user);
-
/* now throw away the key memory */
if (key->type->destroy)
key->type->destroy(key);
+ key_user_put(key->user);
+
kfree(key->description);
#ifdef KEY_DEBUGGING