summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-10-15 13:32:59 +0200
committerdimitri staessens <[email protected]>2016-10-15 13:50:36 +0200
commitb936e8c62a25c8fae62244ce29d6403ee4aac6ab (patch)
tree4f8fff344e512a89d36c876249c8d19b62fc8d34 /src/lib
parent34f61c73f290b9f375bebb14bc48a4b15dfcc4cc (diff)
downloadouroboros-b936e8c62a25c8fae62244ce29d6403ee4aac6ab.tar.gz
ouroboros-b936e8c62a25c8fae62244ce29d6403ee4aac6ab.zip
lib: Fix initialisation of flow_set
The safe copy was not correctly initialised.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 348b864c..577fa7a7 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -747,7 +747,8 @@ struct flow_set * flow_set_create()
return NULL;
}
- memset(&set->b, 0, sizeof(set->b));
+ memset(set->b, 0, IRMD_MAX_FLOWS);
+ memset(set->s, 0, IRMD_MAX_FLOWS);
set->dirty = true;
@@ -757,7 +758,7 @@ struct flow_set * flow_set_create()
void flow_set_zero(struct flow_set * set)
{
pthread_rwlock_wrlock(&set->lock);
- memset(&set->b, 0, sizeof(set->b));
+ memset(set->b, 0, IRMD_MAX_FLOWS);
set->dirty = true;
pthread_rwlock_unlock(&set->lock);
}