Uh oh!
There was an error while loading. Please reload this page.
gconnman_agent_test.cpp: Fix memory leak when test fails - #49
Conversation
Use RAII smart pointer to take care of live management of GError object. Although the memory leak only happens when the test fail, it is good to always have Valgrind leaks equal to zero on the tests as reference. Fixes#48 Signed-off-by: Eduardo Gonzalez <eduardo.gonzalez@amarulasolutions.com>
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe agent tests retain the existing helper interface and replace raw ChangesAgent test memory management
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk:⚪ Minimal · up to This change updates test cleanup to avoid a failure-path memory leak without changing product behavior; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧩 Build Artifacts ✅ The following build artifacts were produced: |
Uh oh!
There was an error while loading. Please reload this page.
Use RAII smart pointer to take care of live management of GError object. Although the memory leak only happens when the test fail, it is good to always have Valgrind leaks equal to zero on the tests as reference.
Fixes#48
Summary by CodeRabbit