Commit 175be7e
KVM: PPC: Book3S HV: Free allocated memory if module init fails
The module's exit function is not called when the init fails, we need
to do cleanup before returning.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220125155735.1018683-4-farosas@linux.ibm.com1 parent c5d0d77 commit 175be7e
1 file changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6096 | 6096 | | |
6097 | 6097 | | |
6098 | 6098 | | |
6099 | | - | |
| 6099 | + | |
6100 | 6100 | | |
6101 | 6101 | | |
6102 | 6102 | | |
| |||
6112 | 6112 | | |
6113 | 6113 | | |
6114 | 6114 | | |
6115 | | - | |
| 6115 | + | |
| 6116 | + | |
6116 | 6117 | | |
6117 | 6118 | | |
6118 | 6119 | | |
| |||
6125 | 6126 | | |
6126 | 6127 | | |
6127 | 6128 | | |
6128 | | - | |
| 6129 | + | |
6129 | 6130 | | |
6130 | 6131 | | |
6131 | 6132 | | |
6132 | 6133 | | |
6133 | | - | |
| 6134 | + | |
6134 | 6135 | | |
6135 | 6136 | | |
6136 | 6137 | | |
| |||
6143 | 6144 | | |
6144 | 6145 | | |
6145 | 6146 | | |
| 6147 | + | |
| 6148 | + | |
| 6149 | + | |
| 6150 | + | |
| 6151 | + | |
| 6152 | + | |
6146 | 6153 | | |
6147 | 6154 | | |
6148 | 6155 | | |
| |||
0 commit comments