]> git.proxmox.com Git - mirror_ovs.git/commit
seq: Avoid some "possible leak" warnings from valgrind.
authorBen Pfaff <blp@ovn.org>
Fri, 23 Mar 2018 22:46:49 +0000 (15:46 -0700)
committerBen Pfaff <blp@ovn.org>
Sat, 31 Mar 2018 19:08:15 +0000 (12:08 -0700)
commit056caea89bffe5f27000944c0ed5aaa6f7a2d852
treef1334ae5b0a834ea30050f2f9d5f7528bdacaea4
parent3ffed5cb909d1f915366b2f443609efd3f60823e
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>
lib/seq.c