forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8824bae
committed
Fix some bogus direct uses of realloc().
pg_dump/parallel.c was using realloc() directly with no error check.While the odds of an actual failure here seem pretty low, Coveritycomplains about it, so fix by using pg_realloc() instead.While looking for other instances, I noticed a couple of places inpsql that hadn't gotten the memo about the availability of pg_realloc.These aren't bugs, since they did have error checks, but verboselyinconsistent code is not a good thing.Back-patch as far as 9.3. 9.2 did not have pg_dump/parallel.c, nordid it have pg_realloc available in all frontend code.1 parentab45d90 commit8824bae
3 files changed
+5
-15
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1300 | 1300 |
| |
1301 | 1301 |
| |
1302 | 1302 |
| |
1303 |
| - | |
| 1303 | + | |
1304 | 1304 |
| |
1305 | 1305 |
| |
1306 | 1306 |
| |
1307 | 1307 |
| |
1308 | 1308 |
| |
1309 | 1309 |
| |
1310 | 1310 |
| |
1311 |
| - | |
| 1311 | + | |
1312 | 1312 |
| |
1313 | 1313 |
| |
1314 | 1314 |
| |
|
Lines changed: 1 addition & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1112 | 1112 |
| |
1113 | 1113 |
| |
1114 | 1114 |
| |
1115 |
| - | |
1116 |
| - | |
1117 |
| - | |
1118 |
| - | |
1119 |
| - | |
1120 |
| - | |
| 1115 | + | |
1121 | 1116 |
| |
1122 | 1117 |
| |
1123 | 1118 |
| |
|
Lines changed: 2 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3820 | 3820 |
| |
3821 | 3821 |
| |
3822 | 3822 |
| |
3823 |
| - | |
3824 |
| - | |
3825 |
| - | |
3826 |
| - | |
3827 |
| - | |
3828 |
| - | |
3829 |
| - | |
| 3823 | + | |
| 3824 | + | |
3830 | 3825 |
| |
3831 | 3826 |
| |
3832 | 3827 |
| |
|
0 commit comments
Comments
(0)