aboutsummaryrefslogtreecommitdiff
path: root/net/key
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-04-08 22:41:10 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-13 11:01:44 -0400
commit89eb06f11c314c2ab4ec59039715dc021933a7a0 (patch)
treef31d003d58aff5d798e028ee9be2d1867cc2128b /net/key
parent03478756b1b9298686ca9c8793e484ae39eb4649 (diff)
net/key/af_key.c: add missing kfree_skb
At the point of this error-handling code, alloc_skb has succeded, so free the resulting skb by jumping to the err label. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 11dbb2255cc..7e5d927b576 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3480,7 +3480,7 @@ static int pfkey_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,
/* Addresses to be used by KM for negotiation, if ext is available */
if (k != NULL && (set_sadb_kmaddress(skb, k) < 0))
- return -EINVAL;
+ goto err;
/* selector src */
set_sadb_address(skb, sasize_sel, SADB_EXT_ADDRESS_SRC, sel);