-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
dns: fix parse memory leaky #58973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dns: fix parse memory leaky #58973
Conversation
Review requested:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58973 +/- ##
==========================================
- Coverage 90.06% 90.06% -0.01%
==========================================
Files 640 640
Lines 188523 188523
Branches 36982 36981 -1
==========================================
- Hits 169796 169793 -3
Misses 11449 11449
- Partials 7278 7281 +3
🚀 New features to boost your workflow:
|
@@ -1565,6 +1565,8 @@ Maybe<int> SoaTraits::Parse(QuerySoaWrap* wrap, | |||
|
|||
if (status != ARES_SUCCESS) return Just<int>(status); | |||
|
|||
auto cleanup = OnScopeLeave([&]() { ares_free_data(soa_out); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a follow-up TODO here (doesn't need to be done in this PR) .. it would likely be good to come up with a smart-pointer for these.
Landed in c7eff61 |
PR-URL: #58973 Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #58973 Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #58973 Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #58973 Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Fix
SoaTraits::Parse
memory leaky.make -j4 test
(UNIX), orvcbuild test
(Windows) passes