[v7,12/16] compress/octeontx: remove unnecessary memset
Checks
Commit Message
Calling memset before rte_free not necessary, and could be
removed by the compiler. In this case, the data is not security
sensitive so the memset can be removed. Some security scanning
tools will flag this.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/compress/octeontx/otx_zip.c | 1 -
drivers/compress/octeontx/otx_zip_pmd.c | 2 --
2 files changed, 3 deletions(-)
@@ -81,7 +81,6 @@ zipvf_q_term(struct zipvf_qp *qp)
struct zip_vf *vf = qp->vf;
if (cmdq->va != NULL) {
- memset(cmdq->va, 0, ZIP_MAX_CMDQ_SIZE);
rte_free(cmdq->va);
}
@@ -479,8 +479,6 @@ zip_pmd_stream_free(struct rte_compressdev *dev, void *stream)
(void *)&(z_stream->bufs[0]),
(MAX_BUFS_PER_STREAM * ZIP_BURST_SIZE));
- /* Zero out the whole structure */
- memset(stream, 0, sizeof(struct zip_stream));
rte_free(stream);
return 0;