forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit377b7a8
committed
Don't leak malloc'd strings when a GUC setting is rejected.
Because guc.c prefers to keep all its string values in malloc'dnot palloc'd storage, it has to be more careful than usual toavoid leaks. Error exits out of string GUC hook checks failedto clear the proposed value string, and error exits out ofProcessGUCArray() failed to clear the malloc'd results ofParseLongOption().Found via valgrind testing.This problem is ancient, so back-patch to all supported branches.Discussion:https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us1 parentd303849 commit377b7a8
1 file changed
+47
-24
lines changedLines changed: 47 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10773 | 10773 |
| |
10774 | 10774 |
| |
10775 | 10775 |
| |
| 10776 | + | |
| 10777 | + | |
10776 | 10778 |
| |
10777 | 10779 |
| |
10778 | 10780 |
| |
| |||
10797 | 10799 |
| |
10798 | 10800 |
| |
10799 | 10801 |
| |
10800 |
| - | |
| 10802 | + | |
| 10803 | + | |
| 10804 | + | |
| 10805 | + | |
| 10806 | + | |
| 10807 | + | |
| 10808 | + | |
10801 | 10809 |
| |
10802 | 10810 |
| |
10803 | 10811 |
| |
10804 |
| - | |
10805 |
| - | |
10806 |
| - | |
| 10812 | + | |
| 10813 | + | |
10807 | 10814 |
| |
10808 | 10815 |
| |
10809 | 10816 |
| |
| |||
11235 | 11242 |
| |
11236 | 11243 |
| |
11237 | 11244 |
| |
| 11245 | + | |
| 11246 | + | |
11238 | 11247 |
| |
11239 | 11248 |
| |
11240 | 11249 |
| |
11241 | 11250 |
| |
11242 |
| - | |
11243 |
| - | |
11244 |
| - | |
11245 |
| - | |
11246 |
| - | |
| 11251 | + | |
| 11252 | + | |
| 11253 | + | |
| 11254 | + | |
| 11255 | + | |
| 11256 | + | |
| 11257 | + | |
| 11258 | + | |
| 11259 | + | |
| 11260 | + | |
| 11261 | + | |
| 11262 | + | |
11247 | 11263 |
| |
11248 |
| - | |
| 11264 | + | |
| 11265 | + | |
| 11266 | + | |
| 11267 | + | |
| 11268 | + | |
| 11269 | + | |
| 11270 | + | |
| 11271 | + | |
| 11272 | + | |
| 11273 | + | |
| 11274 | + | |
| 11275 | + | |
| 11276 | + | |
| 11277 | + | |
| 11278 | + | |
| 11279 | + | |
| 11280 | + | |
| 11281 | + | |
11249 | 11282 |
| |
11250 |
| - | |
11251 |
| - | |
11252 |
| - | |
11253 |
| - | |
11254 |
| - | |
11255 |
| - | |
11256 |
| - | |
11257 |
| - | |
11258 |
| - | |
11259 |
| - | |
11260 |
| - | |
11261 |
| - | |
11262 |
| - | |
| 11283 | + | |
| 11284 | + | |
11263 | 11285 |
| |
| 11286 | + | |
11264 | 11287 |
| |
11265 |
| - | |
| 11288 | + | |
11266 | 11289 |
| |
11267 | 11290 |
| |
11268 | 11291 |
| |
|
0 commit comments
Comments
(0)