|SUCCESS| [v1,1/1] net/iavf: fix memory leak on IPsec SP delete
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Sep 14 13:05:21 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/169520
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-09-14
# DPDK Patch Review
## Patch: net/iavf: fix memory leak on IPsec SP delete
---
## Summary
This patch fixes a resource leak in the iavf driver's IPsec security policy deletion path. The code was returning directly without freeing allocated request/response buffers.
---
## Errors
None.
---
## Warnings
None.
---
## Info
### Code Context Analysis
The fix correctly changes an early `return` to an assignment to `rc`, allowing execution to reach the cleanup label where `free(request)` is called.
**Verification of the fix:**
Looking at the code structure:
```c
if (response->req_id != request->req_id)
rc = -EFAULT;
else
rc = response->ipsec_data.ipsec_status->status; // Changed from return
update_cleanup:
free(request);
```
This correctly ensures that regardless of which branch is taken, the code will fall through to the `update_cleanup:` label where resources are freed. The return value is preserved via the `rc` variable.
**Assumption:** The function returns `rc` after the cleanup label. This is standard DPDK error-path pattern and the fix would not make sense otherwise.
**Note:** If `response` also needs to be freed, that should happen at the `update_cleanup:` label as well. The patch does not show whether `response` requires cleanup, so this cannot be verified from the context provided.
---
## Conclusion
This is a correct fix for the reported resource leak. The patch follows DPDK coding standards and properly addresses the issue without introducing new problems.
More information about the test-report
mailing list