aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpython/plpython.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index 851a89ae2ab..b3924e52523 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -29,7 +29,7 @@
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.58.4.5 2006/01/17 17:33:37 tgl Exp $
+ * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.58.4.6 2006/02/20 20:10:43 neilc Exp $
*
*********************************************************************
*/
@@ -548,7 +548,6 @@ PLy_modify_tuple(PLyProcedure * proc, PyObject * pltd, TriggerData *tdata,
{
Py_XDECREF(plntup);
Py_XDECREF(plkeys);
- Py_XDECREF(platt);
Py_XDECREF(plval);
Py_XDECREF(plstr);
@@ -1080,7 +1079,7 @@ PLy_procedure_create(FunctionCallInfo fcinfo, Oid tgreloid,
/*
* now get information required for input conversion of the
- * procedures arguments.
+ * procedure's arguments.
*/
proc->nargs = fcinfo->nargs;
for (i = 0; i < fcinfo->nargs; i++)
@@ -2539,6 +2538,7 @@ PLy_traceback(int *xlevel)
}
PyErr_NormalizeException(&e, &v, &tb);
+ Py_XDECREF(tb);
eob = PyObject_Str(e);
if ((v) && ((vob = PyObject_Str(v)) != NULL))
@@ -2557,9 +2557,10 @@ PLy_traceback(int *xlevel)
Py_DECREF(eob);
Py_XDECREF(vob);
+ Py_XDECREF(v);
/*
- * intuit an appropriate error level for based on the exception type
+ * intuit an appropriate error level based on the exception type
*/
if ((PLy_exc_error) && (PyErr_GivenExceptionMatches(e, PLy_exc_error)))
*xlevel = ERROR;
@@ -2568,6 +2569,7 @@ PLy_traceback(int *xlevel)
else
*xlevel = ERROR;
+ Py_XDECREF(e);
return xstr;
}