Re: [U-Boot] [PATCH 5/8] fdtgrep: Separate out checking of two allocations

2018-06-11 Thread Simon Glass
Hi Heinrich, On 9 June 2018 at 13:46, Heinrich Schuchardt wrote: > On 06/09/2018 08:22 PM, Simon Glass wrote: >> The current code might succeed on the first allocation and fail on the >> second. Separate the checks to avoid this problem. >> >> Of course, free() will never fail and the chances tha

Re: [U-Boot] [PATCH 5/8] fdtgrep: Separate out checking of two allocations

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 08:22 PM, Simon Glass wrote: > The current code might succeed on the first allocation and fail on the > second. Separate the checks to avoid this problem. > > Of course, free() will never fail and the chances that (when allocating > two small areas) one will succeed and one will fail

[U-Boot] [PATCH 5/8] fdtgrep: Separate out checking of two allocations

2018-06-09 Thread Simon Glass
The current code might succeed on the first allocation and fail on the second. Separate the checks to avoid this problem. Of course, free() will never fail and the chances that (when allocating two small areas) one will succeed and one will fail are just as remote. But this keeps coverity happy.