pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: sunqiankun@highgo.com
Subject: BUG #16273: InitDB  Memory leak
Date: Sun, 23 Feb 2020 06:05:48 +0000
Message-ID: <16273-9ebc6c641602e0a5@postgresql.org> (raw)

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).



view thread (2+ messages)  latest in thread

Message-ID: <16273-9ebc6c641602e0a5@postgresql.org>
Permalink:  ../16273-9ebc6c641602e0a5@postgresql.org/
Also on:    postgresql.org/message-id/16273-9ebc6c641602e0a5@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, sunqiankun@highgo.com
  Subject: Re: BUG #16273: InitDB  Memory leak
  In-Reply-To: <16273-9ebc6c641602e0a5@postgresql.org>
  References: <16273-9ebc6c641602e0a5@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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