summaryrefslogtreecommitdiffhomepage
path: root/windows
diff options
context:
space:
mode:
authorOdd Stranne <odd@mullvad.net>2018-06-05 15:51:04 +0200
committerOdd Stranne <odd@mullvad.net>2018-06-18 08:45:16 +0200
commit0695b4bad811f27b60f74fe3ef54ac32ce615e92 (patch)
tree6e619d4bd7a62b1ecc1b5dca09a309a972adc9f9 /windows
parent4ea73c23b0b41489130af16badbe6c128407dff6 (diff)
downloadmullvadvpn-0695b4bad811f27b60f74fe3ef54ac32ce615e92.tar.xz
mullvadvpn-0695b4bad811f27b60f74fe3ef54ac32ce615e92.zip
Do not leak exceptions to WMI
Diffstat (limited to 'windows')
-rw-r--r--windows/windns/src/windns/wmi/eventdispatcher.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/windows/windns/src/windns/wmi/eventdispatcher.cpp b/windows/windns/src/windns/wmi/eventdispatcher.cpp
index 5b2c64a9aa..b92e9766cb 100644
--- a/windows/windns/src/windns/wmi/eventdispatcher.cpp
+++ b/windows/windns/src/windns/wmi/eventdispatcher.cpp
@@ -61,11 +61,20 @@ HRESULT STDMETHODCALLTYPE EventDispatcherBase::Indicate
{
InterlockedIncrement(&m_callbacks);
- for (LONG i = 0; i < numObjects; ++i)
+ try
{
- CComPtr<IWbemClassObject> eventRecord(objects[i]);
+ for (LONG i = 0; i < numObjects; ++i)
+ {
+ CComPtr<IWbemClassObject> eventRecord(objects[i]);
- dispatch(eventRecord);
+ dispatch(eventRecord);
+ }
+ }
+ catch (...)
+ {
+ //
+ // There is nowhere to forward this error :-(
+ //
}
InterlockedDecrement(&m_callbacks);