From e24172d5ca033e42a14b5b532246bbe7d37e5e8f Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Thu, 2 Aug 2012 09:12:59 -0700 Subject: [PATCH] --- yaml --- r: 321210 b: refs/heads/master c: f0666b1ac875ff32fe290219b150ec62eebbe10e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/ceph/crypto.c | 1 + trunk/net/ceph/crypto.h | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 93273e492181..c990f2193581 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5ef50c3bec20060bc114f62d6503c5d86d70bdd7 +refs/heads/master: f0666b1ac875ff32fe290219b150ec62eebbe10e diff --git a/trunk/net/ceph/crypto.c b/trunk/net/ceph/crypto.c index b780cb7947dd..9da7fdd3cd8a 100644 --- a/trunk/net/ceph/crypto.c +++ b/trunk/net/ceph/crypto.c @@ -466,6 +466,7 @@ void ceph_key_destroy(struct key *key) { struct ceph_crypto_key *ckey = key->payload.data; ceph_crypto_key_destroy(ckey); + kfree(ckey); } struct key_type key_type_ceph = { diff --git a/trunk/net/ceph/crypto.h b/trunk/net/ceph/crypto.h index 1919d1550d75..3572dc518bc9 100644 --- a/trunk/net/ceph/crypto.h +++ b/trunk/net/ceph/crypto.h @@ -16,7 +16,8 @@ struct ceph_crypto_key { static inline void ceph_crypto_key_destroy(struct ceph_crypto_key *key) { - kfree(key->key); + if (key) + kfree(key->key); } extern int ceph_crypto_key_clone(struct ceph_crypto_key *dst,