From bc4a6c0d07b474c5a8d66424d595e3f18621eb18 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Thu, 25 Feb 2021 12:45:34 -0800 Subject: [PATCH] fix for subtle bug due to GetField now potentially returning a new ValPtr --- src/logging/Manager.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/logging/Manager.cc b/src/logging/Manager.cc index 11efb7b802..77dd8205b9 100644 --- a/src/logging/Manager.cc +++ b/src/logging/Manager.cc @@ -1095,9 +1095,12 @@ threading::Value** Manager::RecordToFilterVals(Stream* stream, Filter* filter, // potentially be nested inside other records. list& indices = filter->indices[i]; + ValPtr val_ptr; + for ( list::iterator j = indices.begin(); j != indices.end(); ++j ) { - val = val->AsRecordVal()->GetField(*j).get(); + val_ptr = val->AsRecordVal()->GetField(*j); + val = val_ptr.get(); if ( ! val ) {