From e10dcede7d4b1d2f4c3b6aa45610de0c07a6b538 Mon Sep 17 00:00:00 2001 From: Jure Varlec Date: Thu, 19 May 2022 10:10:45 +0200 Subject: [PATCH] ts filter: clear the dtor field after destruction --- modules/database/src/std/filters/ts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/database/src/std/filters/ts.c b/modules/database/src/std/filters/ts.c index b98f3e19c..24520195c 100644 --- a/modules/database/src/std/filters/ts.c +++ b/modules/database/src/std/filters/ts.c @@ -167,6 +167,7 @@ static db_field_log *replace_fl_value(tsPrivate const *pvt, /* Get rid of the old value */ if (pfl->type == dbfl_type_ref && pfl->u.r.dtor) { pfl->u.r.dtor(pfl); + pfl->u.r.dtor = NULL; } pfl->no_elements = 1; pfl->type = dbfl_type_val; @@ -304,6 +305,7 @@ static void channelRegisterPost(dbChannel *chan, void *pvt, datatype */ if (probe->type == dbfl_type_ref && probe->u.r.dtor) { probe->u.r.dtor(probe); + probe->u.r.dtor = NULL; } probe->no_elements = 1; probe->type = dbfl_type_val;