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)
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