On Tue, Jul 05, 2016 at 07:30:11AM -0700, William Tu wrote: > Hi Ben, > > Thanks, this indeed fixes the "possible" leaks.
Thanks, I applied this to master as follows. --8<--------------------------cut here-------------------------->8-- From: Ben Pfaff <b...@ovn.org> Date: Tue, 5 Jul 2016 08:33:05 -0700 Subject: [PATCH] netlink-notifier: Avoid valgrind possible leak warning. This ensures that pointers to nln_notifiers are to the beginning of the structs instead of to the middle, meaning that valgrind does not consider them "possible" leaks. Reported-by: William Tu <u9012...@gmail.com> Tested-by: William Tu <u9012...@gmail.com> Signed-off-by: Ben Pfaff <b...@ovn.org> --- lib/netlink-notifier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/netlink-notifier.c b/lib/netlink-notifier.c index 0867952..3acded4 100644 --- a/lib/netlink-notifier.c +++ b/lib/netlink-notifier.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc. + * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2016 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,9 +46,9 @@ struct nln { }; struct nln_notifier { + struct ovs_list node; /* In struct nln's 'all_notifiers' list. */ struct nln *nln; /* Parent nln. */ - struct ovs_list node; int multicast_group; /* Multicast group we listen on. */ nln_notify_func *cb; void *aux; -- 2.1.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev