aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-11-04 15:16:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-11-04 15:16:48 +0000
commit70b6e99e40c07c9dfaed932d466b8c4b687cbc15 (patch)
tree9828c175a5f1d61d2d9cd9884170023c0e6eae86 /src
parent725ba51f2c1eb87aca90dec7deb0f17e6f4d8adb (diff)
downloadpostgresql-70b6e99e40c07c9dfaed932d466b8c4b687cbc15.tar.gz
postgresql-70b6e99e40c07c9dfaed932d466b8c4b687cbc15.zip
Fix bug introduced in recent patch to make plpython cope with OUT arguments:
the proc->argnames array has to be initialized to zero immediately on creation, since the error recovery path will try to free its elements.
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpython/plpython.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index b732ac5427c..1e136b22c64 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -1,7 +1,7 @@
/**********************************************************************
* plpython.c - python as a procedural language for PostgreSQL
*
- * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.115 2008/11/02 01:45:28 tgl Exp $
+ * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.116 2008/11/04 15:16:48 tgl Exp $
*
*********************************************************************
*/
@@ -1282,7 +1282,7 @@ PLy_procedure_create(HeapTuple procTup, Oid tgreloid, char *key)
}
}
- proc->argnames = (char **) PLy_malloc(sizeof(char *) * proc->nargs);
+ proc->argnames = (char **) PLy_malloc0(sizeof(char *) * proc->nargs);
for (i = pos = 0; i < total; i++)
{
HeapTuple argTypeTup;