diff options
author | Mustafa Ismail <mustafa.ismail@intel.com> | 2018-05-07 12:52:17 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-05-09 10:39:50 -0400 |
commit | 5a7189d529cd146cd5838af97b32fcac4122b471 (patch) | |
tree | f2930f63d9ca80ea9461094dc7ad79e4c43bcecf /drivers/fpga/fpga-mgr.c | |
parent | 37da2a03c036538a5a79766d74bfcf5b873e5cad (diff) |
i40iw: Fix memory leak in error path of create QP
If i40iw_allocate_dma_mem fails when creating a QP, the
memory allocated for the QP structure using kzalloc is not
freed because iwqp->allocated_buffer is used to free the
memory and it is not setup until later. Fix this by setting
iwqp->allocated_buffer before allocating the dma memory.
Fixes: d37498417947 ("i40iw: add files for iwarp interface")
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions