Ticket #5306 (closed Bugs: fixed)
|Reported by:||habdank@…||Owned by:||igaztanaga|
|Milestone:||To Be Determined||Component:||interprocess|
inline bool get_wmi_class_attribute( std::wstring& strValue, const wchar_t *wmi_class, const wchar_t *wmi_class_var)
in the file:
The problem is that at the end of function there is a sequence:
pIWbemLocator->Release(); pWbemServices->Release(); pEnumObject->Release(); pClassObject->Release();
But there is no guarantee that pClassObject != NULL especially that it is initilized to be NULL and then perhaps modification is made in:
pEnumObject->Next( WBEM_INFINITE_IG, uCount, &pClassObject, &uReturned )
but under some conditions pClassObject remains NULL and then
crashes with memory violation error. Obviously when pClassObject == NULL then pClassObject->Release(); dereferences NULL pointer.
My honest suggestion would be to carefully track all execution paths in that function to observe its complete behavior.
I would appreciate to get patch for that problem. Temporarily I could patch myself, but that will have limited focus, as I have no big picture.
Best regards, Seweryn Habdank-Wojewodzki.