Repository navigation
Commit 0ff02e8
authored
std: Fix memory leak of the last response headers after a nested HTTP request (#24201)
* Fix leak of the last response headers after a nested HTTP request
php_stream_url_wrap_http() releases BG(last_http_headers) before the request
and copies the new headers over it after. A request made while the first one
runs, from its notification callback, stores its own headers there in between,
and the copy overwrote that array without releasing it.
* Release the last response headers once, after the request
The release before the request is dropped: a single release after it covers
both the previous request's headers and those stored by a nested one.1 parent 67decbe commit 0ff02e8
2 files changed
Lines changed: 45 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1272 | 1272 | | |
1273 | 1273 | | |
1274 | 1274 | | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | 1275 | | |
1279 | 1276 | | |
1280 | 1277 | | |
1281 | 1278 | | |
1282 | | - | |
1283 | | - | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
1284 | 1282 | | |
| 1283 | + | |
1285 | 1284 | | |
1286 | 1285 | | |
1287 | 1286 | | |
| |||
| 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 | + | |
0 commit comments