Re: [PATCH v2] net/mlx5e: Fix use of freed pointer

2020-09-29 Thread Leon Romanovsky
On Tue, Sep 29, 2020 at 11:15:49AM +0100, Alex Dewar wrote: > If the call to mlx5_fc_create() fails, then shared_counter will be freed > before its member, shared_counter->counter, is accessed to retrieve the > error code. Fix by using an intermediate variable. > > Addresses-Coverity: CID 1497153:

[PATCH v2] net/mlx5e: Fix use of freed pointer

2020-09-29 Thread Alex Dewar
If the call to mlx5_fc_create() fails, then shared_counter will be freed before its member, shared_counter->counter, is accessed to retrieve the error code. Fix by using an intermediate variable. Addresses-Coverity: CID 1497153: Memory - illegal accesses (USE_AFTER_FREE) Fixes: 1edae2335adf ("net/