sync filter checking
Detect condition which would result to a double free().
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user