Skip to content

Replace realloc with std::vector in IOThreadProc#10821

Closed
qorexdevs wants to merge 1 commit into
Icinga:masterfrom
qorexdevs:bugfix/replace-realloc-with-vector-10813
Closed

Replace realloc with std::vector in IOThreadProc#10821
qorexdevs wants to merge 1 commit into
Icinga:masterfrom
qorexdevs:bugfix/replace-realloc-with-vector-10813

Conversation

@qorexdevs
Copy link
Copy Markdown

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

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
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 23, 2026

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
  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Please contact us if you think this is the case.

  • If you signed the CLA as a corporation, your GitHub username may not have been submitted to us. Please reach out to the responsible person in your organization.

@qorexdevs
Copy link
Copy Markdown
Author

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.

@qorexdevs
Copy link
Copy Markdown
Author

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.

@qorexdevs
Copy link
Copy Markdown
Author

Closing this for now because I still have not completed the CLA. I will reopen the same fix after CLA is signed.

@qorexdevs qorexdevs closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace realloc(3) and maybe malloc(3) with std::vector

1 participant