On Sat, 15 Nov 2014, Chen Gang wrote:

> Also in c_common_read_pch(), when failure occurs, also need be sure the
> 'fd' is not '-1' for the next close operation.

Please clarify how c_common_read_pch gets called with fd == -1.  
Certainly checking after an error is too late; we shouldn't call fdopen in 
that case at all, and I think something further up the call chain should 
have avoided calling c_common_read_pch with fd == -1 at all (the question 
is just exactly what point on the call chain is missing such a check and 
needs it added).

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to