Commit 49ff8c5
committed
Fix file descriptor leaks in remote import, save, and checkpoint operations
Fix four file descriptor leaks:
1. tunnel/images.go Import: os.Open(opts.Source) never closed
2. tunnel/images.go Save: second os.Open for oci-dir/docker-dir never closed
3. bindings/checkpoint.go Restore: os.Open(importPath) never closed
4. container_internal_common.go: os.Create in checkpoint volume export
loop not closed on five error paths
These are the same class of bug fixed in #28723 and #28724.
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>1 parent 6ef4d68 commit 49ff8c5
3 files changed
Lines changed: 10 additions & 1 deletion
File tree
- libpod
- pkg
- bindings/containers
- domain/infra/tunnel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
| 1204 | + | |
1204 | 1205 | | |
1205 | 1206 | | |
1206 | 1207 | | |
1207 | 1208 | | |
1208 | 1209 | | |
| 1210 | + | |
1209 | 1211 | | |
1210 | 1212 | | |
1211 | 1213 | | |
| 1214 | + | |
1212 | 1215 | | |
1213 | 1216 | | |
1214 | 1217 | | |
1215 | 1218 | | |
1216 | 1219 | | |
1217 | 1220 | | |
1218 | 1221 | | |
| 1222 | + | |
1219 | 1223 | | |
1220 | 1224 | | |
1221 | 1225 | | |
1222 | 1226 | | |
1223 | 1227 | | |
| 1228 | + | |
1224 | 1229 | | |
1225 | 1230 | | |
1226 | 1231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
| |||
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
| 358 | + | |
357 | 359 | | |
358 | 360 | | |
359 | 361 | | |
| |||
0 commit comments