Commit 63159d6
committed
librbd/migration: close source image in OpenSourceImageRequest
Currently, on errors in FormatInterface::open(), RawFormat disposes
of src_image_ctx, but QCOWFormat doesn't, which is a leak. Rather than
having each format do it internally, do it in OpenSourceImageRequest.
Signed-off-by: Ilya Dryomov <[email protected]>1 parent cacf7ca commit 63159d6
File tree
3 files changed
+4
-14
lines changed- src
- librbd/migration
- test/librbd/migration
3 files changed
+4
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
| 146 | + | |
148 | 147 | | |
149 | 148 | | |
150 | 149 | | |
| |||
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
164 | | - | |
| 163 | + | |
165 | 164 | | |
166 | 165 | | |
167 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
| 111 | + | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | 128 | | |
136 | 129 | | |
137 | 130 | | |
| |||
174 | 167 | | |
175 | 168 | | |
176 | 169 | | |
177 | | - | |
178 | 170 | | |
179 | 171 | | |
180 | 172 | | |
| |||
203 | 195 | | |
204 | 196 | | |
205 | 197 | | |
206 | | - | |
207 | 198 | | |
208 | 199 | | |
209 | 200 | | |
| |||
0 commit comments