m_pWvConnEp = NULL;\r
}\r
\r
-STDMETHODIMP CNDConnector::\r
-Init(void)\r
-{\r
- HRESULT hr;\r
-\r
- hr = m_pAdapter->m_pWvProvider->CreateConnectEndpoint(&m_pWvConnEp);\r
- return NDConvertWVStatus(hr);\r
-}\r
-\r
CNDConnector::~CNDConnector()\r
{\r
if (m_pWvConnEp != NULL) {\r
IBAT_PATH_BLOB path;\r
HRESULT hr;\r
\r
+ if (m_pWvConnEp != NULL) {\r
+ m_pWvConnEp->Release();\r
+ }\r
+\r
+ hr = m_pAdapter->m_pWvProvider->CreateConnectEndpoint(&m_pWvConnEp);\r
+ if (FAILED(hr)) {\r
+ goto out;\r
+ }\r
+\r
RtlCopyMemory(&addr, &m_pAdapter->m_Address, AddressLength);\r
if (addr.Sa.sa_family == AF_INET) {\r
addr.Sin.sin_port = LocalPort;\r