From: | Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Gabriele Bartolini <gabriele(dot)bartolini(at)2ndquadrant(dot)it>, Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>, Gilles Darold <gilles(dot)darold(at)dalibo(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Patch pg_is_in_backup() |
Date: | 2012-06-14 17:48:00 |
Message-ID: | CABwTF4Xa6LpEKcSB1L3cks5HrpA8YE3STAPOmXxY1SW11TJyQw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 14, 2012 at 1:29 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Jun 14, 2012 at 6:06 AM, Gabriele Bartolini
> <gabriele(dot)bartolini(at)2ndquadrant(dot)it> wrote:
> > thank you very much for your patience (and thank you Marco for
> supporting
> > me). I apologise for the delay.
> >
> > I have retested the updated patch and it works fine with me. It is
> "ready
> > for committer" for me.
>
> Committed.
A minor gripe:
+ /*
+ * Close the backup label file.
+ */
+ if (ferror(lfp) || FreeFile(lfp)) {
+ ereport(ERROR,
+ (errcode_for_file_access(),
+ errmsg("could not read file \"%s\": %m",
+ BACKUP_LABEL_FILE)));
+ }
+
If ferror(lfp) returns false, wouldn't we miss the FreeFile() and leak a
file pointer?
Regards,
--
Gurjeet Singh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2012-06-14 17:56:18 | Re: sortsupport for text |
Previous Message | Robert Haas | 2012-06-14 17:38:25 | Re: psql tab completion for GRANT role |