diff options
author | Ben Pfaff <blp@ovn.org> | 2018-03-23 15:46:49 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-03-31 12:08:15 -0700 |
commit | 056caea89bffe5f27000944c0ed5aaa6f7a2d852 (patch) | |
tree | f1334ae5b0a834ea30050f2f9d5f7528bdacaea4 /lib | |
parent | 3ffed5cb909d1f915366b2f443609efd3f60823e (diff) | |
download | openvswitch-056caea89bffe5f27000944c0ed5aaa6f7a2d852.tar.gz |
seq: Avoid some "possible leak" warnings from valgrind.
valgrind regards a block to be "possibly" leaked when no pointers exist to
the beginning of the block but some pointers do point to the middle of the
block. By moving the hmap_node in struct seq_waiter from the middle of the
struct to the beginning, as this commit does, the pointers to the node from
the hmap in struct seq point to the beginning of the block, which reassures
valgrind.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/seq.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -38,8 +38,8 @@ struct seq { /* A thread waiting on a particular seq. */ struct seq_waiter { - struct seq *seq OVS_GUARDED; /* Seq being waited for. */ struct hmap_node hmap_node OVS_GUARDED; /* In 'seq->waiters'. */ + struct seq *seq OVS_GUARDED; /* Seq being waited for. */ unsigned int ovsthread_id OVS_GUARDED; /* Key in 'waiters' hmap. */ struct seq_thread *thread OVS_GUARDED; /* Thread preparing to wait. */ |