diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-02-04 11:22:36 +0000 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-02-15 15:22:26 -0800 |
commit | cab66d1273e6490603cf5256155584d38cecca68 (patch) | |
tree | 3c698a4645dd873c0f4ac025b4a4ccb005b3f1af /drivers/virt | |
parent | 836dc9e3fbbab0c30aa6e664417225f5c1fb1c39 (diff) |
IB/mlx4: Fix bug unwinding on error in mlx4_ib_init_sriov()
We have to decrement "i" before calling mlx4_ib_free_demux_ctx() or we
free something that wasn't allocated. That's fine for free_pv_object()
but it would lead to a NULL dereference calling mlx4_ib_free_demux_ctx().
The null dereference is because ->tun is NULL when we check:
if (!ctx->tun[i])
Also we didn't free ->sriov.demux[0] so it was a small leak.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/virt')
0 files changed, 0 insertions, 0 deletions