diff options
author | Ben Pfaff <blp@nicira.com> | 2012-03-28 14:13:02 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-03-28 14:55:27 -0700 |
commit | 6e492d81450217a5c90cbb4ad31d81b1e611989b (patch) | |
tree | 6882ef2d7c93c6887a8fcc48dbed3a7b55084b95 /vswitchd | |
parent | 94c336723ca2228cfd60d2207775871e4b773c8b (diff) |
Rearrange structures to better fit valgrind's memory leak heuristics.
valgrind's memory leak detector considers a pointer to the head of a memory
block to be "definitely" a pointer to that memory block but a pointer to
the interior of a memory block only "possibly" a pointer to that memory
block. Open vSwitch hmap_node and list data structures can go anywhere
inside a structure; if they are in the middle of a structure then valgrind
considers pointers to them to be possible leaks. Therefore, this commit
moves some of these from the middle of data structures to the head, to
reduce valgrind's uncertainty.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/bridge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index e15d57b6..adc3b47c 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -87,8 +87,8 @@ struct mirror { }; struct port { - struct bridge *bridge; struct hmap_node hmap_node; /* Element in struct bridge's "ports" hmap. */ + struct bridge *bridge; char *name; const struct ovsrec_port *cfg; |