mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Fix two use-after-free bugs.
This commit is contained in:
parent
ee1312f2ad
commit
1fbeefedbc
2 changed files with 3 additions and 2 deletions
|
@ -2575,8 +2575,8 @@ bool RemoteSerializer::SendLogCreateWriter(PeerID peer_id, EnumVal* id, EnumVal*
|
|||
error:
|
||||
if ( c )
|
||||
{
|
||||
delete c;
|
||||
delete [] c->data;
|
||||
delete c;
|
||||
}
|
||||
|
||||
FatalError(io->Error());
|
||||
|
|
|
@ -402,10 +402,11 @@ bool Manager::RemoveStream(EnumVal* id)
|
|||
}
|
||||
|
||||
stream->writers.clear();
|
||||
string sname(stream->name);
|
||||
delete stream;
|
||||
streams[idx] = 0;
|
||||
|
||||
DBG_LOG(DBG_LOGGING, "Removed logging stream '%s'", stream->name.c_str());
|
||||
DBG_LOG(DBG_LOGGING, "Removed logging stream '%s'", sname.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue