Commit f5ef00a
committed
Free SQLSTATE and SQLERRM no earlier than other PL/pgSQL variables.
"RETURN SQLERRM" prompted plpgsql_exec_function() to read from freed
memory. Back-patch to 9.0 (all supported versions). Little code ran
between the premature free and the read, so non-assert builds are
unlikely to witness user-visible consequences.1 parent 62a4a1a commit f5ef00a
File tree
3 files changed
+24
-10
lines changed- src
- pl/plpgsql/src
- test/regress
- expected
- sql
3 files changed
+24
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
1246 | | - | |
1247 | | - | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
1248 | 1249 | | |
1249 | 1250 | | |
1250 | 1251 | | |
| |||
1268 | 1269 | | |
1269 | 1270 | | |
1270 | 1271 | | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | 1272 | | |
1279 | 1273 | | |
1280 | 1274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2655 | 2655 | | |
2656 | 2656 | | |
2657 | 2657 | | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
2658 | 2669 | | |
2659 | 2670 | | |
2660 | 2671 | | |
| 2672 | + | |
2661 | 2673 | | |
2662 | 2674 | | |
2663 | 2675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2246 | 2246 | | |
2247 | 2247 | | |
2248 | 2248 | | |
2249 | | - | |
2250 | 2249 | | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
2251 | 2258 | | |
2252 | 2259 | | |
2253 | 2260 | | |
| 2261 | + | |
2254 | 2262 | | |
2255 | 2263 | | |
2256 | 2264 | | |
| |||
0 commit comments