aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-04-18 19:16:06 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-04-18 19:16:06 +0000
commit9287567effc81d3892c2a9889dbf99982c6cce58 (patch)
tree51bd67466793a9f56cc1a35443f0bbad93e6d002 /src
parentd38603bd974f2befd1f0599a2392849916b2102c (diff)
downloadpostgresql-9287567effc81d3892c2a9889dbf99982c6cce58.tar.gz
postgresql-9287567effc81d3892c2a9889dbf99982c6cce58.zip
Fix bogus order of cleanup steps in plperl_inline_handler.
Per Alex Hunsaker
Diffstat (limited to 'src')
-rw-r--r--src/pl/plperl/plperl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index c622b644084..9ad2d40d114 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -1,7 +1,7 @@
/**********************************************************************
* plperl.c - perl as a procedural language for PostgreSQL
*
- * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.173 2010/03/18 19:02:46 petere Exp $
+ * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.174 2010/04/18 19:16:06 tgl Exp $
*
**********************************************************************/
@@ -1153,19 +1153,20 @@ plperl_inline_handler(PG_FUNCTION_ARGS)
}
PG_CATCH();
{
- current_call_data = save_call_data;
- restore_context(oldcontext);
if (desc.reference)
SvREFCNT_dec(desc.reference);
+ current_call_data = save_call_data;
+ restore_context(oldcontext);
PG_RE_THROW();
}
PG_END_TRY();
- current_call_data = save_call_data;
- restore_context(oldcontext);
if (desc.reference)
SvREFCNT_dec(desc.reference);
+ current_call_data = save_call_data;
+ restore_context(oldcontext);
+
error_context_stack = pl_error_context.previous;
PG_RETURN_VOID();