Re: BUG #14929: Unchecked AllocateDir() return value in restoreTwoPhaseData() - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #14929: Unchecked AllocateDir() return value in restoreTwoPhaseData()
Date
Msg-id CAB7nPqRJMNnf6CsUufoSEFgAxcQAMCNU08i=WcqGebnB=4Kgig@mail.gmail.com
Whole thread Raw
In response to Re: BUG #14929: Unchecked AllocateDir() return value inrestoreTwoPhaseData()  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-bugs
On Mon, Nov 27, 2017 at 7:35 PM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> It seems like a good idea to check cldir for NULL before freeing.  Please
> find attached a patch to implement the same.

There are other places where this could be added like
CheckPointLogicalRewriteHeap() if you'd like to make the code more
consistent, but my opinion would be on the contrary to drop all the
checks after AllocateDir if ReadDir is directly used. Not worth
bothering at the end.
-- 
Michael


pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #14929: Unchecked AllocateDir() return value in restoreTwoPhaseData()
Next
From: Amit Langote
Date:
Subject: Re: BUG #14929: Unchecked AllocateDir() return value inrestoreTwoPhaseData()