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.
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 believeVariantInit
,VariantClear
orIWbemClassObject::Get
could throw an exception that would skip over line 56.EDIT: I have found two more places where resources can be leaked.