BUG #16273: InitDB Memory leak - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #16273: InitDB Memory leak
Date
Msg-id 16273-9ebc6c641602e0a5@postgresql.org
Whole thread Raw
Responses Re: BUG #16273: InitDB Memory leak  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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).


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16272: Index expression can refer to wrong attributes if index is created via CREATE TABLE LIKE
Next
From: Tom Lane
Date:
Subject: Re: BUG #16273: InitDB Memory leak