diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2022-06-20 07:55:36 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2022-06-20 07:55:36 +1000 |
commit | f4038ad1f4676918862f6e6e727c52fcf38b76ee (patch) | |
tree | 532f7b3f08ee1e10b89bba66b26700f7867bd89b /net | |
parent | e5a5c1f1217c2da6e8392d5a1c745dfcb7fefd64 (diff) | |
parent | f85daf0e725358be78dfd208dea5fd665d8cb901 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git
Diffstat (limited to 'net')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index f1876ea61fdc..f1a0bab920a5 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -2678,8 +2678,10 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family, *num_xfrms = 0; return 0; } - if (IS_ERR(pols[0])) + if (IS_ERR(pols[0])) { + *num_pols = 0; return PTR_ERR(pols[0]); + } *num_xfrms = pols[0]->xfrm_nr; @@ -2694,6 +2696,7 @@ static int xfrm_expand_policies(const struct flowi *fl, u16 family, if (pols[1]) { if (IS_ERR(pols[1])) { xfrm_pols_put(pols, *num_pols); + *num_pols = 0; return PTR_ERR(pols[1]); } (*num_pols)++; |