RDMA/qedr: Fix potential use after free
Move the release operation after error log to avoid possible use after free. Link: https://lore.kernel.org/r/1573021434-18768-1-git-send-email-bianpan2016@163.com Signed-off-by: Pan Bian <bianpan2016@163.com> Acked-by: Michal Kalderon <michal.kalderon@marvell.com> Reviewed-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
e88982ad1b
commit
960657b732
|
@ -481,10 +481,10 @@ qedr_addr6_resolve(struct qedr_dev *dev,
|
|||
|
||||
if ((!dst) || dst->error) {
|
||||
if (dst) {
|
||||
dst_release(dst);
|
||||
DP_ERR(dev,
|
||||
"ip6_route_output returned dst->error = %d\n",
|
||||
dst->error);
|
||||
dst_release(dst);
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue