sync filter checking

Detect condition which would result to a double free().
This commit is contained in:
Michael Davidsaver
2012-07-05 15:25:18 -04:00
parent 0f79bdadb4
commit 93485edcd9

View File

@@ -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;
}