1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

iec61850: fix double free in destructor of global receiver list

This commit is contained in:
Steffen Vogel 2019-01-12 23:21:34 +01:00
parent f1959c7ab3
commit b229a9948a

View file

@ -65,8 +65,6 @@ static pthread_t thread;
static EthernetHandleSet hset;
static int users = 0;
LIST_INIT_STATIC(&receivers);
static void * iec61850_thread(void *ctx)
{
int ret;
@ -165,6 +163,10 @@ int iec61850_type_start(struct super_node *sn)
if (users > 0)
return 0;
ret = vlist_init(&receivers);
if (ret)
return ret;
hset = EthernetHandleSet_new();
ret = pthread_create(&thread, NULL, iec61850_thread, NULL);