diff options
-rw-r--r-- | net/key/af_key.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 81a8e5297ad1..2403a31fe0f6 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -2356,7 +2356,7 @@ static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, struct sadb_msg | |||
2356 | struct xfrm_selector sel; | 2356 | struct xfrm_selector sel; |
2357 | struct km_event c; | 2357 | struct km_event c; |
2358 | struct sadb_x_sec_ctx *sec_ctx; | 2358 | struct sadb_x_sec_ctx *sec_ctx; |
2359 | struct xfrm_sec_ctx *pol_ctx; | 2359 | struct xfrm_sec_ctx *pol_ctx = NULL; |
2360 | 2360 | ||
2361 | if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC-1], | 2361 | if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC-1], |
2362 | ext_hdrs[SADB_EXT_ADDRESS_DST-1]) || | 2362 | ext_hdrs[SADB_EXT_ADDRESS_DST-1]) || |
@@ -2396,8 +2396,7 @@ static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, struct sadb_msg | |||
2396 | kfree(uctx); | 2396 | kfree(uctx); |
2397 | if (err) | 2397 | if (err) |
2398 | return err; | 2398 | return err; |
2399 | } else | 2399 | } |
2400 | pol_ctx = NULL; | ||
2401 | 2400 | ||
2402 | xp = xfrm_policy_bysel_ctx(XFRM_POLICY_TYPE_MAIN, | 2401 | xp = xfrm_policy_bysel_ctx(XFRM_POLICY_TYPE_MAIN, |
2403 | pol->sadb_x_policy_dir - 1, &sel, pol_ctx, | 2402 | pol->sadb_x_policy_dir - 1, &sel, pol_ctx, |