wbemprox: Don't call CloseServiceHandle() with an invalid handle.
This commit is contained in:
parent
3e7f0e685b
commit
125f3151cb
|
@ -69,11 +69,11 @@ static HRESULT control_service( const WCHAR *name, DWORD control, VARIANT *retva
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (!ControlService( service, control, &status )) error = map_error( GetLastError() );
|
if (!ControlService( service, control, &status )) error = map_error( GetLastError() );
|
||||||
|
CloseServiceHandle( service );
|
||||||
|
|
||||||
done:
|
done:
|
||||||
set_variant( VT_UI4, error, NULL, retval );
|
set_variant( VT_UI4, error, NULL, retval );
|
||||||
CloseServiceHandle( service );
|
if (manager) CloseServiceHandle( manager );
|
||||||
CloseServiceHandle( manager );
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,11 +183,11 @@ static HRESULT start_service( const WCHAR *name, VARIANT *retval )
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (!StartServiceW( service, 0, NULL )) error = map_error( GetLastError() );
|
if (!StartServiceW( service, 0, NULL )) error = map_error( GetLastError() );
|
||||||
|
CloseServiceHandle( service );
|
||||||
|
|
||||||
done:
|
done:
|
||||||
set_variant( VT_UI4, error, NULL, retval );
|
set_variant( VT_UI4, error, NULL, retval );
|
||||||
CloseServiceHandle( service );
|
if (manager) CloseServiceHandle( manager );
|
||||||
CloseServiceHandle( manager );
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue