Content-Length: 280691 | pFad | http://github.com/postgrespro/postgres_cluster/commit/62546b4357f2aec46bb896fdbddfc0904a2d7920

31 Revert "PL/Python: Fix potential NULL pointer dereference" · postgrespro/postgres_cluster@62546b4 · GitHub
Skip to content

Commit 62546b4

Browse files
committed
Revert "PL/Python: Fix potential NULL pointer dereference"
This reverts commit e42e2f3. It's not safe to return in the middle of a PG_TRY block, so this will have to be done differently.
1 parent 445dbd8 commit 62546b4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/pl/plpython/plpy_spi.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,7 @@ PLy_spi_execute_fetch_result(SPITupleTable *tuptable, uint64 rows, int status)
361361

362362
result = (PLyResultObject *) PLy_result_new();
363363
if (!result)
364-
{
365-
SPI_freetuptable(tuptable);
366364
return NULL;
367-
}
368365
Py_DECREF(result->status);
369366
result->status = PyInt_FromLong(status);
370367

@@ -417,9 +414,7 @@ PLy_spi_execute_fetch_result(SPITupleTable *tuptable, uint64 rows, int status)
417414
if (!result->rows)
418415
{
419416
Py_DECREF(result);
420-
MemoryContextDelete(cxt);
421-
SPI_freetuptable(tuptable);
422-
return NULL;
417+
result = NULL;
423418
}
424419
else
425420
{

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/62546b4357f2aec46bb896fdbddfc0904a2d7920

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy