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,9 +790,11 @@ 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;
} else if (nx == 0) {
......
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