forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1a29217
committed
Free temporary memory when reading TOC
ReadStr returns allocated memory which the caller is responsible forfreeing when done with the string. This commit ensures that memory isfreed in one case which used ReadStr in a conditional. While the leakmight not be too concerning, this makes the code consistent across allReadStr callsites in ReadToc. Due to the lack of complaints of issuesin production from this, no backpatch is performed at this point.Author: Bharath Rupireddy, Georgios KokolatosReviewed-by: Kyotaro HoriguchiDiscussion:https://postgr.es/m/oZwKiUxFsVaetG2xOJp7Hwao8F1AKIdfFDQLNJrnwoaxmjyB-45r_aYmhgXHKLcMI3GT24m9L6HafSi2ns7WFxXe0mw2_tIJpD-Z3vb_eyI=@pm.me1 parentcf29a11 commit1a29217
1 file changed
+15
-1
lines changedLines changed: 15 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2494 | 2494 |
| |
2495 | 2495 |
| |
2496 | 2496 |
| |
| 2497 | + | |
2497 | 2498 |
| |
2498 | 2499 |
| |
2499 | 2500 |
| |
| |||
2574 | 2575 |
| |
2575 | 2576 |
| |
2576 | 2577 |
| |
2577 |
| - | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
2578 | 2592 |
| |
2579 | 2593 |
| |
2580 | 2594 |
| |
|
0 commit comments
Comments
(0)