net/mlx5: fix flow counters creation
The Flow counter creation function contains two problems:
- Flow counter object in Verbs is not freed in case of memory
allocation error. The call of counter Verbs object deallocating
function is added to fix.
- The initial value of reference counter is set to one in order
to provide the correct counter object freeing in the
flow_verbs_counter_release() function. The reference counter
field should be initialized to one.
Fixes:
60bd8c9747e8 ("net/mlx5: add count flow action")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>