forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit54fd196
committed
Prevent corner-case core dump in rfree().
rfree() failed to cope with the case that pg_regcomp() had initialized theregex_t struct but then failed to allocate any memory for re->re_guts (ie,the first malloc call in pg_regcomp() failed). It would try to touch theguts struct anyway, and thus dump core. This is a sufficiently narrowcorner case that it's not surprising it's never been seen in the field;but still a bug is a bug, so patch all active branches.Noted while investigating whether we need to call pg_regfree after afailure return from pg_regcomp. Other than this bug, it turns out wedon't, so adjust comments appropriately.1 parent2686da9 commit54fd196
2 files changed
+16
-11
lines changedLines changed: 15 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
278 | 278 |
| |
279 | 279 |
| |
280 | 280 |
| |
| 281 | + | |
| 282 | + | |
| 283 | + | |
281 | 284 |
| |
282 | 285 |
| |
283 | 286 |
| |
| |||
1870 | 1873 |
| |
1871 | 1874 |
| |
1872 | 1875 |
| |
1873 |
| - | |
1874 |
| - | |
1875 |
| - | |
1876 |
| - | |
1877 |
| - | |
1878 |
| - | |
1879 |
| - | |
1880 |
| - | |
1881 |
| - | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
1882 | 1888 |
| |
1883 | 1889 |
| |
1884 | 1890 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
190 |
| - | |
| 190 | + | |
191 | 191 |
| |
192 |
| - | |
193 | 192 |
| |
194 | 193 |
| |
195 | 194 |
| |
|
0 commit comments
Comments
(0)