diff options
author | Navid Emamdoost <navid.emamdoost@gmail.com> | 2019-09-27 23:56:04 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2019-10-09 13:01:06 +0300 |
commit | 0f4f199443faca715523b0659aa536251d8b978f (patch) | |
tree | 3c9db4d6d36f6cf55cc11617c445384dfaa90f10 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | b4b814fec1a5a849383f7b3886b654a13abbda7d (diff) | |
download | linux-0f4f199443faca715523b0659aa536251d8b978f.tar.xz |
iwlwifi: pcie: fix memory leaks in iwl_pcie_ctxt_info_gen3_init
In iwl_pcie_ctxt_info_gen3_init there are cases that the allocated dma
memory is leaked in case of error.
DMA memories prph_scratch, prph_info, and ctxt_info_gen3 are allocated
and initialized to be later assigned to trans_pcie. But in any error case
before such assignment the allocated memories should be released.
First of such error cases happens when iwl_pcie_init_fw_sec fails.
Current implementation correctly releases prph_scratch. But in two
sunsequent error cases where dma_alloc_coherent may fail, such
releases are missing.
This commit adds release for prph_scratch when allocation for
prph_info fails, and adds releases for prph_scratch and prph_info when
allocation for ctxt_info_gen3 fails.
Fixes: 2ee824026288 ("iwlwifi: pcie: support context information for 22560 devices")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions