Re: ParseTzFile doesn't FreeFile on error

2022-05-31 Thread Kyotaro Horiguchi
At Tue, 31 May 2022 14:21:28 -0400, Tom Lane wrote in > Actually the problem *is* reachable, if you intentionally break the > already-active timezone abbreviation file: newly started sessions > produce file-leak warnings after failing to apply the setting. > I concede that's not a likely scenario

Re: ParseTzFile doesn't FreeFile on error

2022-05-31 Thread Tom Lane
Kyotaro Horiguchi writes: > At Mon, 30 May 2022 13:11:04 -0400, Tom Lane wrote in >> BTW, my first thought about it was "what if one of the callees throws >> elog(ERROR), eg palloc out-of-memory"? But I think that's all right >> since then we'll reach transaction abort cleanup, which won't whin

Re: ParseTzFile doesn't FreeFile on error

2022-05-30 Thread Kyotaro Horiguchi
At Mon, 30 May 2022 13:11:04 -0400, Tom Lane wrote in > Kyotaro Horiguchi writes: > > The cause is ParseTzFile() returns leaving an open file descriptor > > unfreed in some error cases. > > This happens only in a special case when the errors are ignored, but > > in principle the file descriptor

Re: ParseTzFile doesn't FreeFile on error

2022-05-30 Thread Tom Lane
Kyotaro Horiguchi writes: > The cause is ParseTzFile() returns leaving an open file descriptor > unfreed in some error cases. > This happens only in a special case when the errors are ignored, but > in principle the file descriptor should be released before exiting the > function. > I'm not sure i