]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Fix memory leak in do_slave_init
authorDoug Ledford <dledford@redhat.com>
Thu, 9 Jul 2015 14:16:12 +0000 (10:16 -0400)
committerDoug Ledford <dledford@redhat.com>
Tue, 14 Jul 2015 17:20:15 +0000 (13:20 -0400)
commit88a2f76a3cc802a976034c2270b89c44dd289870
tree7a30b55fc8a4cf4ab9c7d1433f1b2f584d05de7b
parente8ba25210b960a93d0b06324cab3577976c56b70
IB/mlx4: Fix memory leak in do_slave_init

We create a number of work structs to be queued up to a workqueue, and
on completion of the workqueue handler, the workqueue handler frees the
allocated memory.  If, however, we don't queue the work struct because
the device is going down, then we need to free the memory ourselves.

Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx4/main.c