|WARNING| [2/2] net/ice: fix unchecked Tx time context allocation
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Wed Oct 7 10:45:58 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/170774
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-07
# DPDK Patch Review
## Patch 1/2: net/ice: free memory with matching allocator
### Errors
None identified.
### Warnings
None identified.
### Info
This patch corrects the allocator/deallocator pairing throughout the ice driver.
Memory allocated via `ice_malloc()`, `ice_calloc()`, or `ice_memdup()` should be freed with `ice_free()`, not `rte_free()`.
While both currently map to the same underlying functions, the change ensures consistency and future-proofs the code against potential OS abstraction layer changes.
All substitutions appear correct and complete:
- `ice_acl_filter.c`: 5 instances
- `ice_dcf.c`: 1 instance
- `ice_dcf_parent.c`: 1 instance
- `ice_ethdev.c`: 6 instances
- `ice_fdir_filter.c`: 6 instances
- `ice_rxtx.c`: 9 instances
No functional change expected.
---
## Patch 2/2: net/ice: fix unchecked Tx time context allocation
### Errors
None identified.
### Warnings
None identified.
### Info
This patch fixes a missing allocation failure check for `ts_elem` returned by `ice_malloc()`.
The fix correctly:
1. Checks for NULL after allocation
2. Frees the already-allocated `txq_elem` before returning error (preventing resource leak)
3. Returns `-ENOMEM` to propagate the error
The error path is now complete:
- `txq_elem` freed on all error branches
- `ts_elem` freed after use (already present at line 912 in original code)
No issues detected.
---
## Overall Assessment
Both patches are correct. Patch 1 improves consistency, and Patch 2 fixes a genuine correctness bug (missing allocation check + resource leak).
More information about the test-report
mailing list