BUG #16273: InitDB Memory leak

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: sunqiankun(at)highgo(dot)com
Subject: BUG #16273: InitDB Memory leak
Date: 2020-02-23 06:05:48
Message-ID: 16273-9ebc6c641602e0a5@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16273
Logged by: sun qiankun
Email address: sunqiankun(at)highgo(dot)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).

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-02-23 06:43:26 Re: BUG #16273: InitDB Memory leak
Previous Message Michail Nikolaev 2020-02-22 20:08:45 Re: BUG #16108: Colorization to the output of command-line has unproperly behaviors at Windows platform