diff options
author | David S. Miller <davem@davemloft.net> | 2016-09-23 12:46:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-23 12:46:57 +0200 |
commit | d6989d4bbe6c4d1c2a76696833a07f044e85694d (patch) | |
tree | 2d9a70d0feee4d4a20568be1b39a961fa0d27d81 /net/xfrm | |
parent | xen-netback: switch to threaded irq for control ring (diff) | |
parent | Merge tag 'media/v4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mch... (diff) | |
download | linux-d6989d4bbe6c4d1c2a76696833a07f044e85694d.tar.xz linux-d6989d4bbe6c4d1c2a76696833a07f044e85694d.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_state.c | 1 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index ba8bf518ba14..5685da05e6ce 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -350,6 +350,7 @@ static void xfrm_state_gc_destroy(struct xfrm_state *x) { tasklet_hrtimer_cancel(&x->mtimer); del_timer_sync(&x->rtimer); + kfree(x->aead); kfree(x->aalg); kfree(x->ealg); kfree(x->calg); diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index cb65d916a345..08892091cfe3 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -581,9 +581,12 @@ static struct xfrm_state *xfrm_state_construct(struct net *net, if (err) goto error; - if (attrs[XFRMA_SEC_CTX] && - security_xfrm_state_alloc(x, nla_data(attrs[XFRMA_SEC_CTX]))) - goto error; + if (attrs[XFRMA_SEC_CTX]) { + err = security_xfrm_state_alloc(x, + nla_data(attrs[XFRMA_SEC_CTX])); + if (err) + goto error; + } if ((err = xfrm_alloc_replay_state_esn(&x->replay_esn, &x->preplay_esn, attrs[XFRMA_REPLAY_ESN_VAL]))) |