Commit 8f1b7c2
committed
mbstring: Fix memory leak in mail header parsing
A header field name with no value (input ending at the colon) leaves
fld_name allocated but unreleased, since the cleanup blocks only fire
when both fld_name and fld_val are set. Release the dangling fld_name in
both the loop-body and end-of-input branches.1 parent 17f6752 commit 8f1b7c2
1 file changed
Lines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4444 | 4444 | | |
4445 | 4445 | | |
4446 | 4446 | | |
4447 | | - | |
4448 | | - | |
4449 | | - | |
4450 | | - | |
| 4447 | + | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
4451 | 4452 | | |
4452 | | - | |
| 4453 | + | |
| 4454 | + | |
4453 | 4455 | | |
4454 | 4456 | | |
4455 | 4457 | | |
| |||
4490 | 4492 | | |
4491 | 4493 | | |
4492 | 4494 | | |
4493 | | - | |
4494 | | - | |
4495 | | - | |
4496 | | - | |
4497 | | - | |
| 4495 | + | |
| 4496 | + | |
| 4497 | + | |
| 4498 | + | |
| 4499 | + | |
| 4500 | + | |
| 4501 | + | |
4498 | 4502 | | |
4499 | 4503 | | |
4500 | 4504 | | |
| |||
0 commit comments