On Wed, Jan 20, 2016 at 09:47:32PM -0800, Andy Zhou wrote: > On Wed, Jan 20, 2016 at 4:33 PM, Ben Pfaff <b...@ovn.org> wrote: > > > Until now, ofputil_decode_switch_features() has put the ports from the > > switch features message into a separate ofpbuf supplied as an argument. > > The natural desire for a caller is to just reuse an ofpbuf that it already > > has, and that's what one of the callers did. This however has the > > nonobvious effect of leaking the memory that the ofpbuf previously owned, > > since it gets replaced by an OFPBUF_CONST-type ofpbuf. > > > > This commit avoids the problem by changing the interface to pull the > > header from an ofpbuf that the caller already has. > > > > This fixes a leak in testcase 909 "ofproto-dpif - patch ports". > > > > Found by valgrind. > > > > Reported-by: William Tu <u9012...@gmail.com> > > Reported-at: http://openvswitch.org/pipermail/dev/2016-January/064771.html > > Signed-off-by: Ben Pfaff <b...@ovn.org> > > > > > Nice! > > Acked-by: Andy Zhou <az...@ovn.org>
Thanks, I applied this to master. I didn't backport it because the only real bug it fixes is a memory leak in ovs-ofctl, which I don't think matters. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev