forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2a083ab
pg_upgrade: Fix inconsistency in memory freeing
The function in charge of freeing the memory from a result created byPQescapeIdentifier() has to be PQfreemem(), to ensure that bothallocation and free come from libpq.One spot in pg_upgrade was not respecting that for pg_database'sdatlocale (daticulocale in v16) when the collation provider is libc (akadatlocale/daticulocale is NULL) with an allocation done usingpg_strdup() and a free with PQfreemem(). The code is changed to alwaysuse PQescapeLiteral() when processing the input.Oversight in9637bad. This commit is similar to48e4ae9 and5b94e27.Author: Michael Paquier <michael@paquier.xyz>Co-authored-by: Ranier Vilela <ranier.vf@gmail.com>Discussion:https://postgr.es/m/Z601RQxTmIUohdkV@paquier.xyzBackpatch-through: 161 parent2e4127b commit2a083ab
1 file changed
+5
-6
lines changedLines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
437 | 437 |
| |
438 | 438 |
| |
439 | 439 |
| |
| 440 | + | |
440 | 441 |
| |
441 | 442 |
| |
442 | 443 |
| |
| |||
450 | 451 |
| |
451 | 452 |
| |
452 | 453 |
| |
453 |
| - | |
454 |
| - | |
455 |
| - | |
456 |
| - | |
457 |
| - | |
458 |
| - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
459 | 458 |
| |
460 | 459 |
| |
461 | 460 |
| |
|
0 commit comments
Comments
(0)