Commit d8c5617
net/mlx5: HWS, fixed double-free in error flow of creating SQ
When SQ creation fails, call the appropriate mlx5_core destroy function.
This fixes the following smatch warnings:
divers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_send.c:739
hws_send_ring_open_sq() warn: 'sq->dep_wqe' double freed
hws_send_ring_open_sq() warn: 'sq->wq_ctrl.buf.frags' double freed
hws_send_ring_open_sq() warn: 'sq->wr_priv' double freed
Fixes: 2ca6259 ("net/mlx5: HWS, added send engine and context handling")
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Yevgeny Kliteynik <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>1 parent 19da170 commit d8c5617
File tree
1 file changed
+7
-1
lines changed- drivers/net/ethernet/mellanox/mlx5/core/steering/hws
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
656 | 662 | | |
657 | 663 | | |
658 | 664 | | |
| |||
696 | 702 | | |
697 | 703 | | |
698 | 704 | | |
699 | | - | |
| 705 | + | |
700 | 706 | | |
701 | 707 | | |
702 | 708 | | |
| |||
0 commit comments