[PATCH v2 03/16] cryptodev/bcmfs: fix mis-matched free
Stephen Hemminger
stephen at networkplumber.org
Sat Sep 28 18:47:11 CEST 2024
The device structure is allocated with rte_malloc() and
then incorrectly freed with free(). This will lead to
corrupt malloc pool.
Bugzilla ID: 1552
Fixes: c8e79da7c676 ("crypto/bcmfs: introduce BCMFS driver")
Cc: vikas.gupta at broadcom.com
Cc: stable at dpdk.org
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/crypto/bcmfs/bcmfs_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/bcmfs/bcmfs_device.c b/drivers/crypto/bcmfs/bcmfs_device.c
index ada7ba342c..46522970d5 100644
--- a/drivers/crypto/bcmfs/bcmfs_device.c
+++ b/drivers/crypto/bcmfs/bcmfs_device.c
@@ -139,7 +139,7 @@ fsdev_allocate_one_dev(struct rte_vdev_device *vdev,
return fsdev;
cleanup:
- free(fsdev);
+ rte_free(fsdev);
return NULL;
}
@@ -163,7 +163,7 @@ fsdev_release(struct bcmfs_device *fsdev)
return;
TAILQ_REMOVE(&fsdev_list, fsdev, next);
- free(fsdev);
+ rte_free(fsdev);
}
static int
--
2.45.2
More information about the dev
mailing list