mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix memory leak due to enum type/val circular references
Introduced in 2982765128
This commit is contained in:
parent
2e2f611df5
commit
49a30d61cf
7 changed files with 15 additions and 6 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
2.6-111 | 2019-01-29 18:17:35 -0600
|
||||||
|
|
||||||
|
* Fix memory leak due to enum type/val circular references (Jon Siwek, Corelight)
|
||||||
|
|
||||||
2.6-110 | 2019-01-29 14:49:10 -0800
|
2.6-110 | 2019-01-29 14:49:10 -0800
|
||||||
|
|
||||||
* Add fuid to SSL:Invalid_Server_Cert notice (Stephen Hosom)
|
* Add fuid to SSL:Invalid_Server_Cert notice (Stephen Hosom)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.6-110
|
2.6-111
|
||||||
|
|
|
@ -1714,7 +1714,12 @@ bool EnumType::DoUnserialize(UnserialInfo* info)
|
||||||
|
|
||||||
names[name] = val;
|
names[name] = val;
|
||||||
delete [] name; // names[name] converts to std::string
|
delete [] name; // names[name] converts to std::string
|
||||||
vals[val] = new EnumVal(this, val);
|
// note: the 'vals' map gets populated lazily, which works fine and
|
||||||
|
// also happens to avoid a leak due to circular reference between the
|
||||||
|
// types and vals (there's a special case for unserializing a known
|
||||||
|
// type that will unserialze and then immediately want to unref the
|
||||||
|
// type if we already have it, except that won't delete it as intended
|
||||||
|
// if we've already created circular references to it here).
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Broker peer added, [address=127.0.0.1, bound_port=9999/tcp]
|
Broker peer added, 127.0.0.1
|
||||||
got event msg, pong, 0
|
got event msg, pong, 0
|
||||||
got auto event msg, ping, 0
|
got auto event msg, ping, 0
|
||||||
got event msg, pong, 1
|
got event msg, pong, 1
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Broker peer added, [address=127.0.0.1, bound_port=9999/tcp]
|
Broker peer added, 127.0.0.1
|
||||||
|
|
2
testing/external/commit-hash.zeek-testing
vendored
2
testing/external/commit-hash.zeek-testing
vendored
|
@ -1 +1 @@
|
||||||
42fd25c235d0c10319c3597d23f113dbbd89567f
|
2f7a827cc339fc14b0c978c986fa776dd9e7903c
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
e71c2dc19eabc68f590381f52a53a207f3b92f78
|
60170dfea85dedd4dc9bece020d0614f04d7f30e
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue