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

Wrap the webserver's and Resolver::tryGetSOASerial objects into smart pointers #5543

Merged
merged 4 commits into from Jul 25, 2017

Conversation

Projects
None yet
2 participants
@rgacogne
Member

rgacogne commented Jul 19, 2017

Short description

There was no issue AFAICT, but it makes it less likely to mess up in the future and leak memory, or trigger a use-after-free.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
@zeha

This comment has been minimized.

Show comment
Hide comment
@zeha

zeha Jul 24, 2017

Collaborator

👍 It looks like std::thread can take more than one argument, so the entire connectionThreadData struct could go away.

Collaborator

zeha commented Jul 24, 2017

👍 It looks like std::thread can take more than one argument, so the entire connectionThreadData struct could go away.

@rgacogne

This comment has been minimized.

Show comment
Hide comment
@rgacogne

rgacogne Jul 24, 2017

Member

Oh, I didn't think about that! Thanks for the suggestion, I'll amend this PR!

Member

rgacogne commented Jul 24, 2017

Oh, I didn't think about that! Thanks for the suggestion, I'll amend this PR!

auth: Get rid of the webserver's connectionThreadData struct
Thanks to zeha for suggesting that the struct was not needed anymore
since `std::thread` takes a variable number of parameters.
@rgacogne

This comment has been minimized.

Show comment
Hide comment
@rgacogne

rgacogne Jul 24, 2017

Member

Removed connectionThreadData, thanks again!

Member

rgacogne commented Jul 24, 2017

Removed connectionThreadData, thanks again!

@zeha

zeha approved these changes Jul 25, 2017

@rgacogne rgacogne merged commit 638dd3d into PowerDNS:master Jul 25, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rgacogne rgacogne deleted the rgacogne:web-auto-ptr branch Jul 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment