Re: pg_check_dir comments and implementation mismatch

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_check_dir comments and implementation mismatch
Date: 2015-01-30 02:54:51
Message-ID: CAB7nPqSG4WuDH9ghejBO3hn4N=RHWF=WGpWYnnE=7emdrh+HXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 30, 2015 at 2:49 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> There is at least one other bug in that function now that I look at it:
> in event of a readdir() failure, it neglects to execute closedir().
> Perhaps not too significant since all existing callers will just exit()
> anyway after a failure, but still ...
I would imagine that code scanners like coverity or similar would not
be happy about that. ISTM that it is better to closedir()
appropriately in all the code paths.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-01-30 02:55:22 Re: Possible typo in create_policy.sgml
Previous Message Stephen Frost 2015-01-30 02:04:50 Re: Possible typo in create_policy.sgml