[dpdk-dev] [PATCH v4 3/9] mem: fix potential double close

Bruce Richardson bruce.richardson at intel.com
Mon Apr 30 11:00:09 CEST 2018


On Fri, Apr 27, 2018 at 06:07:04PM +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've done all error
> checks.
> 
> Coverity issue: 272560
> 
> Fixes: 2a04139f66b4 ("eal: add single file segments option")
> Cc: anatoly.burakov at intel.com
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
> 
> Notes:
>     v4:
>     - Moved fd close to until after all error checks are done
> 
Acked-by: Bruce Richardson <bruce.richardson at intel.com>


More information about the dev mailing list