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

2020-09-28 Thread Leon Romanovsky
On Sun, Sep 27, 2020 at 12:32:53PM +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 3/3] net/mlx5e: Fix use of freed pointer

2020-09-27 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) Signed-off-by: Alex Dewar