Replace realloc with std::vector in IOThreadProc#10821
Conversation
The raw realloc calls in Process::IOThreadProc() are replaced with std::vector, which handles resizing and cleanup automatically. Also fixes a minor memory leak since the old pointers were never freed. refs Icinga#10813
|
Thank you for your pull request. Before we can look at it, you'll need to sign a Contributor License Agreement (CLA). Please follow instructions at https://icinga.com/company/contributor-agreement to sign the CLA. After that, please reply here with a comment and we'll verify. Contributors that have not signed yet: @qorexdevs Details
|
|
Thanks for the reminder. CLA check is still the only blocker here. I have not completed the Icinga CLA yet, I will sign it and reply on this thread so the bot can re-verify. |
|
Quick update: I still have not completed the CLA, so this PR cannot proceed from my side right now. To keep your queue clean, feel free to close it. I can reopen the same fix after CLA is signed. |
|
Closing this for now because I still have not completed the CLA. I will reopen the same fix after CLA is signed. |
Replaces the raw realloc calls in Process::IOThreadProc() with std::vector for the handles/fhandles (Windows) and pfds (Linux) arrays. The vectors handle resizing and memory cleanup automatically -- the old raw pointers were never freed since the function loops forever, so this also fixes a minor leak if the thread ever exits.
fixes #10813