From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: taem@linukz.org
Subject: BUG #15838: [contrib] vacuumlo: schema variable checked for NULL three times
Date: Fri, 07 Jun 2019 06:15:30 +0000
Message-ID: <15838-3221652c72c5e69d@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15838
Logged by: Timur Birsh
Email address: taem@linukz.org
PostgreSQL version: 11.2
Operating system: CentOS 7
Description:
Hello,
vacuumlo() has this (starting on line 239):
if (!schema || !table || !field)
{
fprintf(stderr, "%s", PQerrorMessage(conn));
PQclear(res);
PQfinish(conn);
if (schema != NULL)
PQfreemem(schema);
if (schema != NULL)
PQfreemem(table);
if (schema != NULL)
PQfreemem(field);
return -1;
}
I think this can be replaced with this:
if (!schema || !table || !field)
{
fprintf(stderr, "%s", PQerrorMessage(conn));
PQclear(res);
PQfinish(conn);
if (schema != NULL) {
PQfreemem(schema);
PQfreemem(table);
PQfreemem(field);
}
return -1;
}
Thanks,
Timur
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, taem@linukz.org
Subject: Re: BUG #15838: [contrib] vacuumlo: schema variable checked for NULL three times
In-Reply-To: <15838-3221652c72c5e69d@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