Commit faa1cc2a authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[IPSEC] Fix refcnt leak in xfrm_lookup

This patch fixes a refcnt leak when the policy changes on us in
xfrm_lookup.
parent b28ae60c
......@@ -790,8 +790,10 @@ int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
goto error;
}
if (err == -EAGAIN ||
genid != atomic_read(&flow_cache_genid))
genid != atomic_read(&flow_cache_genid)) {
xfrm_pol_put(policy);
goto restart;
}
}
if (err)
goto error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment