On Wed, Apr 25, 2018 at 10:56:41AM +0100, Anatoly Burakov wrote:
> We were closing descriptor before checking if mapping has
> failed, but if it did, we did a second close afterwards. Fix
> it by moving closing descriptor to after we check if mmap has
> succeeded.
> 
> Coverity issue: 272560
> 
> Fixes: 2a04139f66b4 ("eal: add single file segments option")
> Cc: anatoly.bura...@intel.com
> 
> Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com>
> ---
Is a better fix not to assign fd to -1 after closing and then checking that
in the error leg?

Reply via email to