Commit 0542346d authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wbemprox: Avoid assigning COM objects to interface variables.

parent a6344997
...@@ -78,7 +78,7 @@ static HRESULT WINAPI enum_class_object_QueryInterface( ...@@ -78,7 +78,7 @@ static HRESULT WINAPI enum_class_object_QueryInterface(
if ( IsEqualGUID( riid, &IID_IEnumWbemClassObject ) || if ( IsEqualGUID( riid, &IID_IEnumWbemClassObject ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = ec; *ppvObject = &ec->IEnumWbemClassObject_iface;
} }
else if ( IsEqualGUID( riid, &IID_IClientSecurity ) ) else if ( IsEqualGUID( riid, &IID_IClientSecurity ) )
{ {
...@@ -324,7 +324,7 @@ static HRESULT WINAPI class_object_QueryInterface( ...@@ -324,7 +324,7 @@ static HRESULT WINAPI class_object_QueryInterface(
if ( IsEqualGUID( riid, &IID_IWbemClassObject ) || if ( IsEqualGUID( riid, &IID_IWbemClassObject ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = co; *ppvObject = &co->IWbemClassObject_iface;
} }
else if (IsEqualGUID( riid, &IID_IClientSecurity )) else if (IsEqualGUID( riid, &IID_IClientSecurity ))
{ {
......
...@@ -79,7 +79,7 @@ static HRESULT WINAPI qualifier_set_QueryInterface( ...@@ -79,7 +79,7 @@ static HRESULT WINAPI qualifier_set_QueryInterface(
if ( IsEqualGUID( riid, &IID_IWbemQualifierSet ) || if ( IsEqualGUID( riid, &IID_IWbemQualifierSet ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = set; *ppvObject = &set->IWbemQualifierSet_iface;
} }
else else
{ {
......
...@@ -52,7 +52,7 @@ static HRESULT WINAPI client_security_QueryInterface( ...@@ -52,7 +52,7 @@ static HRESULT WINAPI client_security_QueryInterface(
if ( IsEqualGUID( riid, &IID_IClientSecurity ) || if ( IsEqualGUID( riid, &IID_IClientSecurity ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = cs; *ppvObject = &cs->IClientSecurity_iface;
} }
else else
{ {
...@@ -264,7 +264,7 @@ static HRESULT WINAPI wbem_services_QueryInterface( ...@@ -264,7 +264,7 @@ static HRESULT WINAPI wbem_services_QueryInterface(
if ( IsEqualGUID( riid, &IID_IWbemServices ) || if ( IsEqualGUID( riid, &IID_IWbemServices ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = ws; *ppvObject = &ws->IWbemServices_iface;
} }
else if ( IsEqualGUID( riid, &IID_IClientSecurity ) ) else if ( IsEqualGUID( riid, &IID_IClientSecurity ) )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment