diff --git a/CHANGES b/CHANGES index 7e4a9ff534..38259c6e41 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ +2.6-66 | 2019-01-14 10:26:47 -0600 + + * Fix performance issue due to variable reuse in table expiration (Justin Azoff, Corelight) + 2.6-62 | 2019-01-10 15:45:04 -0600 * Reorganize documentation index (Jon Siwek, Corelight) diff --git a/VERSION b/VERSION index 3c8e3c7c78..943a43ab6c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6-62 +2.6-66 diff --git a/src/Val.cc b/src/Val.cc index 059ce24f4a..13abb22507 100644 --- a/src/Val.cc +++ b/src/Val.cc @@ -2348,6 +2348,7 @@ void TableVal::DoExpire(double t) HashKey* k = 0; TableEntryVal* v = 0; + TableEntryVal* v_saved = 0; for ( int i = 0; i < table_incremental_step && (v = tbl->NextEntry(k, expire_cookie)); ++i ) @@ -2371,10 +2372,12 @@ void TableVal::DoExpire(double t) // It's possible that the user-provided // function modified or deleted the table // value, so look it up again. + v_saved = v; v = tbl->Lookup(k); if ( ! v ) { // user-provided function deleted it + v = v_saved; delete k; continue; }