aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mlx5
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2022-02-17 11:45:25 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2022-02-17 12:13:09 +0000
commitd2a788a522f78f7c4b014df9097348419d90fae4 (patch)
treea1e24645aab67ebf46af1559df1a0a0b8654f30b /sys/dev/mlx5
parentbf8e97858365fe121968445c593dd4128d5f5490 (diff)
Diffstat (limited to 'sys/dev/mlx5')
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_iq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c b/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c
index e375864dc85f..6553b002aa1b 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c
@@ -141,6 +141,10 @@ mlx5e_iq_free_db(struct mlx5e_iq *iq)
iq->data[x].callback(iq->data[x].arg);
iq->data[x].callback = NULL;
}
+ if (unlikely(iq->data[x].p_refcount != NULL)) {
+ atomic_add_int(iq->data[x].p_refcount, -1);
+ iq->data[x].p_refcount = NULL;
+ }
bus_dmamap_destroy(iq->dma_tag, iq->data[x].dma_map);
}
free(iq->data, M_MLX5EN);