|SUCCESS| [v1,1/1] net/iavf: fix resource leak on IPsec init fail

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Tue Sep 15 11:24:45 CEST 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/169563

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-09-15

# DPDK Patch Review

## Summary

Reviewing patch: **net/iavf: fix resource leak on IPsec init fail**

This patch addresses a resource leak in the iavf driver's device initialization error path. The patch is correct and follows DPDK guidelines.

---

## Findings

###  No Issues Found

The patch correctly fixes a resource leak on the error path:

**What the patch does:**
1. Adds `iavf_flow_uninit(adapter)` call in the `security_init_err` label
2. Changes one `goto` target from `flow_init_err` to `security_init_err` to ensure flow engines are cleaned up when security context creation fails

**Why this is correct:**
- The flow engines are initialized before the security context creation
- If security context creation or initialization fails, the existing code jumped to `flow_init_err` which skipped calling `iavf_security_ctx_destroy()`
- The new `goto security_init_err` ensures both security cleanup AND flow uninit happen in the correct order
- The cleanup order (security ctx destroy, then flow uninit) is appropriate

**Code structure after patch:**
```c
security_init_err:
    iavf_security_ctx_destroy(adapter);
    iavf_flow_uninit(adapter);        /* NEW - was missing */

flow_init_err:
    vf->aq_intr_enabled = false;
```

This is a proper fix for a resource leak on an error path.

### Style and Format

 Code follows DPDK C style  
 No forbidden tokens  
 Proper error handling pattern  
 Appropriate use of goto labels for cleanup  

### Process Compliance

 Fixes tag present and correct  
 Cc: stable at dpdk.org included (appropriate for backport)  
 Change is minimal and focused on the bug fix  

---

## Conclusion

**APPROVED** - This patch correctly fixes the resource leak and follows all applicable guidelines.


More information about the test-report mailing list