net/mlx5: fix double free on error handling