fix memleaks (use smartpointers)
[vuplus_dvbapp] / lib / dvb_ci / dvbci.cpp
index 80573e8..c3f9148 100644 (file)
@@ -73,6 +73,8 @@ int eDVBCIInterfaces::reset(int slotid)
        if( (slot = getSlot(slotid)) == 0 )
                return -1;
 
+       eDVBCISession::deleteSessions(slot);
+
        return slot->reset();
 }
 
@@ -299,6 +301,7 @@ void eDVBCISlot::data(int what)
                        state = stateRemoved;
                        enableTS(0);
                        printf("ci removed\n");
+                       eDVBCISession::deleteSessions(this);
                        notifier->setRequested(eSocketNotifier::Read);
                        //HACK
                        eDVBCI_UI::getInstance()->setState(0,0);