[ovs-git] [openvswitch/ovs] 056cae: seq: Avoid some "possible leak" warnings from valg...

GitHub noreply at github.com
Sat Mar 31 19:22:34 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 056caea89bffe5f27000944c0ed5aaa6f7a2d852
      https://github.com/openvswitch/ovs/commit/056caea89bffe5f27000944c0ed5aaa6f7a2d852
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2018-03-31 (Sat, 31 Mar 2018)

  Changed paths:
    M lib/seq.c

  Log Message:
  -----------
  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 at ovn.org>
Reviewed-by: Yifeng Sun <pkusunyifeng at gmail.com>




More information about the git mailing list