Commit 7c59735
committed
ext/mysqli: Fix stmt->query leak in mysqli_execute_query() validation errors.
When MYSQLI_REPORT_INDEX is enabled, mysqli_execute_query() duplicates
the query string into stmt->query. The two input_params validation
error branches freed the MY_STMT wrapper directly without releasing
stmt->query, leaking the duplicated string per failing call.1 parent 5bd7e3b commit 7c59735
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
535 | 539 | | |
536 | 540 | | |
537 | 541 | | |
| |||
542 | 546 | | |
543 | 547 | | |
544 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
545 | 553 | | |
546 | 554 | | |
547 | 555 | | |
| |||
0 commit comments