Skip to content
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

Fix resource leaks #243

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fix resource leaks #243

wants to merge 4 commits into from

Conversation

Bobini1
Copy link

@Bobini1 Bobini1 commented Mar 18, 2024

I have found two places in the code where resources are not released correctly.

It is possible to revert the deletion of SAFE_RELEASE(pCOMDev); from line 64 if you believe VariantInit, VariantClear or IWbemClassObject::Get could throw an exception that would skip over line 56.

EDIT: I have found two more places where resources can be leaked.

Tomasz Kalisiak added 4 commits March 18, 2024 12:22
(cherry picked from commit 61b22d2b17864ded5ae47a94271f0dfa7013358b)
(cherry picked from commit e63ee22b19a35d1832274be67b1846e7dac69f98)
(cherry picked from commit 0f2d19eb155f576660822ba0525fca5061548fb3)
…edWmi block was not entered

(cherry picked from commit 384f89a64a31b669797f4c06e806499a75d85182)
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.

None yet

1 participant