/**********************************************************************
* plpython.c - python as a procedural language for PostgreSQL
*
- * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.148 2010/07/08 19:00:11 tgl Exp $
+ * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.149 2010/08/25 19:37:56 petere Exp $
*
*********************************************************************
*/
elog(FATAL, "expected a PyCObject, didn't get one");
proc = PyCObject_AsVoidPtr(plproc);
+ if (!proc)
+ PLy_elog(ERROR, "PyCObject_AsVoidPtr() failed");
if (proc->me != plproc)
elog(FATAL, "proc->me != plproc");
/* did we find an up-to-date cache entry? */
PLy_procedure_compile(proc, procSource);
pfree(procSource);
+ procSource = NULL;
proc->me = PyCObject_FromVoidPtr(proc, NULL);
+ if (!proc->me)
+ PLy_elog(ERROR, "PyCObject_FromVoidPtr() failed");
PyDict_SetItemString(PLy_procedure_cache, key, proc->me);
}
PG_CATCH();