Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit62546b4

Browse files
committed
Revert "PL/Python: Fix potential NULL pointer dereference"
This reverts commite42e2f3.It's not safe to return in the middle of a PG_TRY block, so this willhave to be done differently.
1 parent445dbd8 commit62546b4

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
returnNULL;
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-
returnNULL;
417+
result=NULL;
423418
}
424419
else
425420
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp