diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-10-15 13:32:59 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-10-15 13:50:36 +0200 |
commit | b936e8c62a25c8fae62244ce29d6403ee4aac6ab (patch) | |
tree | 4f8fff344e512a89d36c876249c8d19b62fc8d34 /src/lib | |
parent | 34f61c73f290b9f375bebb14bc48a4b15dfcc4cc (diff) | |
download | ouroboros-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.c | 5 |
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); } |