]> git.sesse.net Git - vlc/blobdiff - projects/activex/connectioncontainer.cpp
activex: Fix heap corrumption on Async event delivery
[vlc] / projects / activex / connectioncontainer.cpp
index b9f601a8b8d703d15e98f4520ce39cc2940286d2..fbceb7e450e30891ce2f1a03858cac926cb719fa 100644 (file)
@@ -365,6 +365,7 @@ VLCConnectionPointContainer::~VLCConnectionPointContainer()
 {
     EnterCriticalSection(&csEvents);
     isRunning = FALSE;
+    freeze = TRUE;
     ConditionSignal(&sEvents);
     LeaveCriticalSection(&csEvents);
 
@@ -376,6 +377,11 @@ VLCConnectionPointContainer::~VLCConnectionPointContainer()
     ConditionDestroy(&sEvents);
     DeleteCriticalSection(&csEvents);
 
+    _v_cps.clear();
+    while(!_q_events.empty()) {
+        _q_events.pop();
+    };
+
     delete _p_props;
     delete _p_events;
 };