forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit397ea90
committed
Fix memory leak when guc.c decides a setting can't be applied now.
The prohibitValueChange code paths in set_config_option(), whichare executed whenever we re-read a PGC_POSTMASTER variable frompostgresql.conf, neglected to free anything before exiting. Thuswe'd leak the proposed new value of a PGC_STRING variable, as notedby BoChen in bug #16666. For all variable types, if the check hookcreates an "extra" chunk, we'd also leak that.These are malloc not palloc chunks, so there is no mechanism forrecovering the leaks before process exit. Fortunately, the valuesare typically not very large, meaning you'd have to go through anawful lot of SIGHUP configuration-reload cycles to make the leakageamount to anything. Still, for a long-lived postmaster process itcould potentially be a problem.Oversight in commit2594cf0. Back-patch to all supported branches.Discussion:https://postgr.es/m/16666-2c41a4eec61b03e1@postgresql.org1 parentfcd1132 commit397ea90
1 file changed
+30
-2
lines changedLines changed: 30 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7222 | 7222 |
| |
7223 | 7223 |
| |
7224 | 7224 |
| |
| 7225 | + | |
| 7226 | + | |
| 7227 | + | |
| 7228 | + | |
7225 | 7229 |
| |
7226 | 7230 |
| |
7227 | 7231 |
| |
| |||
7312 | 7316 |
| |
7313 | 7317 |
| |
7314 | 7318 |
| |
| 7319 | + | |
| 7320 | + | |
| 7321 | + | |
| 7322 | + | |
7315 | 7323 |
| |
7316 | 7324 |
| |
7317 | 7325 |
| |
| |||
7402 | 7410 |
| |
7403 | 7411 |
| |
7404 | 7412 |
| |
| 7413 | + | |
| 7414 | + | |
| 7415 | + | |
| 7416 | + | |
7405 | 7417 |
| |
7406 | 7418 |
| |
7407 | 7419 |
| |
| |||
7508 | 7520 |
| |
7509 | 7521 |
| |
7510 | 7522 |
| |
| 7523 | + | |
| 7524 | + | |
7511 | 7525 |
| |
7512 |
| - | |
7513 |
| - | |
| 7526 | + | |
| 7527 | + | |
| 7528 | + | |
| 7529 | + | |
| 7530 | + | |
| 7531 | + | |
| 7532 | + | |
| 7533 | + | |
| 7534 | + | |
| 7535 | + | |
| 7536 | + | |
| 7537 | + | |
7514 | 7538 |
| |
7515 | 7539 |
| |
7516 | 7540 |
| |
| |||
7605 | 7629 |
| |
7606 | 7630 |
| |
7607 | 7631 |
| |
| 7632 | + | |
| 7633 | + | |
| 7634 | + | |
| 7635 | + | |
7608 | 7636 |
| |
7609 | 7637 |
| |
7610 | 7638 |
| |
|
0 commit comments
Comments
(0)