From 93485edcd9e6aaf912ceed9fd062260f360b52de Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 5 Jul 2012 15:25:18 -0400 Subject: [PATCH] sync filter checking Detect condition which would result to a double free(). --- src/std/filters/sync.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/std/filters/sync.c b/src/std/filters/sync.c index 55ff9303a..5fb3e5e0d 100644 --- a/src/std/filters/sync.c +++ b/src/std/filters/sync.c @@ -17,6 +17,7 @@ #include "db_field_log.h" #include "chfPlugin.h" #include "dbState.h" +#include "epicsAssert.h" #define STATE_NAME_LENGTH 20 @@ -126,6 +127,9 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) { my->lastfl = pfl; my->laststate = actstate; + /* since no copy is made we can't keep a reference to the returned fl */ + assert(my->lastfl != passfl); + no_shift: return passfl; }