Commit 4651e37
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 f864fe0 commit 4651e37
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 | |
|---|---|---|---|
| |||
1220 | 1220 | | |
1221 | 1221 | | |
1222 | 1222 | | |
1223 | | - | |
1224 | | - | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
1225 | 1226 | | |
1226 | 1227 | | |
1227 | 1228 | | |
| |||
1245 | 1246 | | |
1246 | 1247 | | |
1247 | 1248 | | |
1248 | | - | |
1249 | | - | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
1253 | | - | |
1254 | | - | |
1255 | 1249 | | |
1256 | 1250 | | |
1257 | 1251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2644 | 2644 | | |
2645 | 2645 | | |
2646 | 2646 | | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
2647 | 2658 | | |
2648 | 2659 | | |
2649 | 2660 | | |
| 2661 | + | |
2650 | 2662 | | |
2651 | 2663 | | |
2652 | 2664 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2241 | 2241 | | |
2242 | 2242 | | |
2243 | 2243 | | |
2244 | | - | |
2245 | 2244 | | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
2246 | 2253 | | |
2247 | 2254 | | |
2248 | 2255 | | |
| 2256 | + | |
2249 | 2257 | | |
2250 | 2258 | | |
2251 | 2259 | | |
| |||
0 commit comments