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

Commitf5c23ca

Browse files
committed
Fix leakage of proc-related storage in plpython's inline handler.
Per report from Andres Freund.
1 parent05f0308 commitf5c23ca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/pl/plpython/plpython.c

Lines changed: 5 additions & 1 deletion
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.142 2010/04/30 19:15:45 tgl Exp $
4+
*$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.143 2010/05/01 17:04:38 tgl Exp $
55
*
66
*********************************************************************
77
*/
@@ -541,12 +541,15 @@ plpython_inline_handler(PG_FUNCTION_ARGS)
541541
}
542542
PG_CATCH();
543543
{
544+
PLy_procedure_delete(proc);
544545
PLy_curr_procedure=save_curr_proc;
545546
PyErr_Clear();
546547
PG_RE_THROW();
547548
}
548549
PG_END_TRY();
549550

551+
PLy_procedure_delete(proc);
552+
550553
/* Pop the error context stack */
551554
error_context_stack=plerrcontext.previous;
552555

@@ -1664,6 +1667,7 @@ PLy_procedure_delete(PLyProcedure *proc)
16641667
}
16651668
if (proc->argnames)
16661669
PLy_free(proc->argnames);
1670+
PLy_free(proc);
16671671
}
16681672

16691673
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp