Re: [Patch] timezone/zic.c: Fix file handle leak in dolink()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: zengman <zengman(at)halodbtech(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Patch] timezone/zic.c: Fix file handle leak in dolink()
Date: 2025-12-28 16:56:03
Message-ID: 2510355.1766940963@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"=?gb18030?B?emVuZ21hbg==?=" <zengman(at)halodbtech(dot)com> writes:
> I noticed a small issue and made a tiny patch to fix it ¡ª it addresses a file handle leak in the dolink() function of src/timezone/zic.c.

Huh? The program is going to exit() two lines further down.
What's the point of closing here?

Even if there were a plausible argument for issuing close(),
I wouldn't care to diverge from upstream zic. If you like
you can go try to persuade the tzdb crew that this is a
useful change.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-12-28 16:59:25 Re: [Patch] timezone/zic.c: Fix file handle leak in dolink()
Previous Message Joel Jacobson 2025-12-28 16:10:24 Re: Optimize LISTEN/NOTIFY