pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16921: small memory leak
3+ messages / 3 participants
[nested] [flat]
* BUG #16921: small memory leak
@ 2021-03-11 06:06 PG Bug reporting form <noreply@postgresql.org>
2021-03-11 11:34 ` Re: BUG #16921: small memory leak Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2021-03-11 06:06 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: rekgrpth@gmail.com
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #16921: small memory leak
2021-03-11 06:06 BUG #16921: small memory leak PG Bug reporting form <noreply@postgresql.org>
@ 2021-03-11 11:34 ` Pavel Stehule <pavel.stehule@gmail.com>
2021-03-11 15:06 ` Re: BUG #16921: small memory leak Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Stehule @ 2021-03-11 11:34 UTC (permalink / raw)
To: rekgrpth@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #16921: small memory leak
2021-03-11 06:06 BUG #16921: small memory leak PG Bug reporting form <noreply@postgresql.org>
2021-03-11 11:34 ` Re: BUG #16921: small memory leak Pavel Stehule <pavel.stehule@gmail.com>
@ 2021-03-11 15:06 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2021-03-11 15:06 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: rekgrpth@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-03-11 15:06 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 06:06 BUG #16921: small memory leak PG Bug reporting form <noreply@postgresql.org>
2021-03-11 11:34 ` Pavel Stehule <pavel.stehule@gmail.com>
2021-03-11 15:06 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox