BUG #16921: small memory leak
The following bug has been logged on the website:
Bug reference: 16921
Logged by: Geo Sil
Email address: rekgrpth@gmail.com
PostgreSQL version: 13.2
Operating system: ubuntu
Description:
Is there a small memory leak here?
file: postgres/src/pl/plpgsql/src/pl_handler.c
function: plpgsql_extra_checks_check_hook
code: myextra = (int *) malloc(sizeof(int));
I don't find freeing memory.
But I suggest do it in functions plpgsql_extra_warnings_assign_hook and
plpgsql_extra_errors_assign_hook
Hi
čt 11. 3. 2021 v 12:04 odesílatel PG Bug reporting form <
noreply@postgresql.org> napsal:
The following bug has been logged on the website:
Bug reference: 16921
Logged by: Geo Sil
Email address: rekgrpth@gmail.com
PostgreSQL version: 13.2
Operating system: ubuntu
Description:Is there a small memory leak here?
file: postgres/src/pl/plpgsql/src/pl_handler.c
function: plpgsql_extra_checks_check_hook
code: myextra = (int *) malloc(sizeof(int));
I don't find freeing memory.
But I suggest do it in functions plpgsql_extra_warnings_assign_hook and
plpgsql_extra_errors_assign_hook
if I understand to source code, then it is released in function
set_extra_field in file guc.c
Regards
Pavel
Pavel Stehule <pavel.stehule@gmail.com> writes:
čt 11. 3. 2021 v 12:04 odesílatel PG Bug reporting form <
noreply@postgresql.org> napsal:Is there a small memory leak here?
file: postgres/src/pl/plpgsql/src/pl_handler.c
if I understand to source code, then it is released in function
set_extra_field in file guc.c
Yeah, a GUC variable's "extra" storage is managed by guc.c. It
would be completely wrong for those plpgsql routines to free it.
regards, tom lane