Commit e33466c
authored
[fetch] Fix double free in fetch_free() with streaming fetch requests (#25856)
`fetch->data` will be allocated and freed in `onprogress` if fetch attribute
`EMSCRIPTEN_FETCH_STREAM_DATA` is used, however it will still be freed in
`fetch_free()` causing double free problem.1 parent 2f01ef4 commit e33466c
File tree
4 files changed
+62
-11
lines changed- src
- lib
- test
- fetch
4 files changed
+62
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
579 | | - | |
| 579 | + | |
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
657 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
658 | 659 | | |
659 | 660 | | |
660 | 661 | | |
| |||
668 | 669 | | |
669 | 670 | | |
670 | 671 | | |
671 | | - | |
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4460 | 4460 | | |
4461 | 4461 | | |
4462 | 4462 | | |
4463 | | - | |
4464 | | - | |
4465 | | - | |
4466 | | - | |
4467 | | - | |
4468 | | - | |
| 4463 | + | |
4469 | 4464 | | |
4470 | 4465 | | |
4471 | 4466 | | |
4472 | 4467 | | |
4473 | 4468 | | |
4474 | 4469 | | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
| 4473 | + | |
| 4474 | + | |
| 4475 | + | |
| 4476 | + | |
| 4477 | + | |
4475 | 4478 | | |
4476 | 4479 | | |
4477 | 4480 | | |
| |||
4538 | 4541 | | |
4539 | 4542 | | |
4540 | 4543 | | |
| 4544 | + | |
| 4545 | + | |
| 4546 | + | |
| 4547 | + | |
| 4548 | + | |
4541 | 4549 | | |
4542 | 4550 | | |
4543 | 4551 | | |
| |||
0 commit comments