On 9/30/2024 8:43 PM, Stephen Hemminger wrote:
Using the freed value for tracing is not a good idea.
Although it is harmless for tracing, it will cause analyzers to flag
this as unsafe.
Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
Acked-by: Chengwen Feng <fengcheng...@huawei.com>
---
lib/eal/common/eal_common_memzone.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_memzone.c
b/lib/eal/common/eal_common_memzone.c
index 2d9b6aa3e3..90efbb621d 100644
--- a/lib/eal/common/eal_common_memzone.c
+++ b/lib/eal/common/eal_common_memzone.c
@@ -331,9 +331,10 @@ rte_memzone_free(const struct rte_memzone *mz)
rte_rwlock_write_unlock(&mcfg->mlock);
+ rte_eal_trace_memzone_free(name, addr, ret);
+
rte_free(addr);
- rte_eal_trace_memzone_free(name, addr, ret);
return ret;
}
Acked-by: Anatoly Burakov <anatoly.bura...@intel.com>
--
Thanks,
Anatoly