Commit 8a558cb
idpf: fix potential memory leak on kcalloc() failure
In case of failing on rss_data->rss_key allocation the function is
freeing vport without freeing earlier allocated q_vector_idxs. Fix it.
Move from freeing in error branch to goto scheme.
Fixes: d4d5587 ("idpf: initialize interrupts and enable vport")
Reviewed-by: Pavan Kumar Linga <[email protected]>
Reviewed-by: Aleksandr Loktionov <[email protected]>
Suggested-by: Pavan Kumar Linga <[email protected]>
Signed-off-by: Michal Swiatkowski <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Tested-by: Samuel Salin <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>1 parent d4cb1ec commit 8a558cb
1 file changed
+11
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1113 | 1113 | | |
1114 | 1114 | | |
1115 | 1115 | | |
1116 | | - | |
1117 | | - | |
| 1116 | + | |
| 1117 | + | |
1118 | 1118 | | |
1119 | | - | |
1120 | | - | |
1121 | 1119 | | |
1122 | 1120 | | |
1123 | 1121 | | |
| |||
1127 | 1125 | | |
1128 | 1126 | | |
1129 | 1127 | | |
1130 | | - | |
1131 | | - | |
| 1128 | + | |
| 1129 | + | |
1132 | 1130 | | |
1133 | | - | |
1134 | | - | |
1135 | 1131 | | |
1136 | 1132 | | |
1137 | 1133 | | |
| |||
1144 | 1140 | | |
1145 | 1141 | | |
1146 | 1142 | | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
1147 | 1150 | | |
1148 | 1151 | | |
1149 | 1152 | | |
| |||
0 commit comments