pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16273: InitDB  Memory leak
2+ messages / 2 participants
[nested] [flat]

* BUG #16273: InitDB  Memory leak
@ 2020-02-23 06:05  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2020-02-23 06:05 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: sunqiankun@highgo.com

The following bug has been logged on the website:

Bug reference:      16273
Logged by:          sun qiankun
Email address:      sunqiankun@highgo.com
PostgreSQL version: 12.1
Operating system:   centos7
Description:        

when i read the code  in src/bin/initdb/initdb.c.
At the function: set_info_version, we use pg_strdup to malloc  memory, but
we don't free it.

Detail info:
char	   *vstr = pg_strdup(PG_VERSION);

we can fix it at the end of the function use free(vstr).



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #16273: InitDB Memory leak
@ 2020-02-23 06:43  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-02-23 06:43 UTC (permalink / raw)
  To: sunqiankun@highgo.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> when i read the code  in src/bin/initdb/initdb.c.
> At the function: set_info_version, we use pg_strdup to malloc  memory, but
> we don't free it.

There are lots of minor memory leaks in initdb.  We don't really care
that much, because the program executes over a fixed set of data and
then terminates.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-02-23 06:43 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-23 06:05 BUG #16273: InitDB  Memory leak PG Bug reporting form <noreply@postgresql.org>
2020-02-23 06:43 ` Re: BUG #16273: InitDB Memory leak 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