Skip to content

Commit 70b6e99

Browse files
committed
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.
1 parent 725ba51 commit 70b6e99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pl/plpython/plpython.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plpython.c - python as a procedural language for PostgreSQL
33
*
4-
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.115 2008/11/02 01:45:28 tgl Exp $
4+
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.116 2008/11/04 15:16:48 tgl Exp $
55
*
66
*********************************************************************
77
*/
@@ -1282,7 +1282,7 @@ PLy_procedure_create(HeapTuple procTup, Oid tgreloid, char *key)
12821282
}
12831283
}
12841284

1285-
proc->argnames = (char **) PLy_malloc(sizeof(char *) * proc->nargs);
1285+
proc->argnames = (char **) PLy_malloc0(sizeof(char *) * proc->nargs);
12861286
for (i = pos = 0; i < total; i++)
12871287
{
12881288
HeapTuple argTypeTup;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy