Have to clearpacket while holding the lock on snap. Otherwise it can get deleted the moment we unlock it.
This commit is contained in:
parent
ff0d6e8e0f
commit
bd6566a819
|
@ -2304,6 +2304,7 @@ bool Monitor::Analyse() {
|
|||
snap->image = nullptr;
|
||||
}
|
||||
|
||||
packetqueue.clearPackets(snap);
|
||||
packetqueue.unlock(packet_lock);
|
||||
|
||||
if ( snap->image_index > 0 ) {
|
||||
|
@ -2314,7 +2315,6 @@ bool Monitor::Analyse() {
|
|||
UpdateAnalysisFPS();
|
||||
}
|
||||
shared_data->last_read_time = time(nullptr);
|
||||
packetqueue.clearPackets(snap);
|
||||
|
||||
return true;
|
||||
} // end Monitor::Analyse
|
||||
|
|
Loading…
Reference in New Issue