Commit d2b9d97
qlcnic: fix memory leak issues in qlcnic_sriov_common.c
Add qlcnic_sriov_free_vlans() in qlcnic_sriov_alloc_vlans() if
any sriov_vlans fails to be allocated.
Add qlcnic_sriov_free_vlans() to free the memory allocated by
qlcnic_sriov_alloc_vlans() if "sriov->allowed_vlans" fails to
be allocated.
Fixes: 91b7282 ("qlcnic: Support VLAN id config.")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Link: https://patch.msgid.link/20250307094952.14874-1-haoxiang_li2024@163.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent 415f135 commit d2b9d97
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
| 458 | + | |
458 | 459 | | |
| 460 | + | |
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
| |||
2167 | 2169 | | |
2168 | 2170 | | |
2169 | 2171 | | |
2170 | | - | |
| 2172 | + | |
| 2173 | + | |
2171 | 2174 | | |
| 2175 | + | |
2172 | 2176 | | |
2173 | 2177 | | |
2174 | 2178 | | |
| |||
0 commit comments