Commit 88de89f
RDMA/bnxt_re: Fix a potential memory leak in destroy_gsi_sqp
The current error handling path in bnxt_re_destroy_gsi_sqp() could lead
to a resource leak. When bnxt_qplib_destroy_qp() fails, the function
jumps to the 'fail' label and returns immediately, skipping the call
to bnxt_qplib_free_qp_res().
Continue the resource teardown even if bnxt_qplib_destroy_qp() fails,
which aligns with the driver's general error handling strategy and
prevents the potential leak.
Fixes: 8dae419 ("RDMA/bnxt_re: Refactor queue pair creation code")
Signed-off-by: YanLong Dai <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>1 parent 3a86608 commit 88de89f
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
916 | | - | |
| 916 | + | |
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
936 | | - | |
| 936 | + | |
937 | 937 | | |
938 | | - | |
939 | | - | |
| 938 | + | |
940 | 939 | | |
941 | 940 | | |
942 | 941 | | |
| |||
951 | 950 | | |
952 | 951 | | |
953 | 952 | | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | 953 | | |
959 | 954 | | |
960 | 955 | | |
| |||
0 commit comments