Looks good. --Justin
On Jan 25, 2013, at 3:21 PM, Ben Pfaff <[email protected]> wrote: > This uninitialized data caused failures in the test "ofproto - > eviction upon table overflow (OpenFlow 1.2)" for some developers and in > some circumstances. > > Found by valgrind. > > Reported-by: Justin Pettit <[email protected]> > Signed-off-by: Ben Pfaff <[email protected]> > --- > lib/vconn.c | 6 +----- > 1 files changed, 1 insertions(+), 5 deletions(-) > > diff --git a/lib/vconn.c b/lib/vconn.c > index ea1e130..bf40b1b 100644 > --- a/lib/vconn.c > +++ b/lib/vconn.c > @@ -1112,17 +1112,13 @@ void > vconn_init(struct vconn *vconn, struct vconn_class *class, int connect_status, > const char *name, uint32_t allowed_versions) > { > + memset(vconn, 0, sizeof *vconn); > vconn->class = class; > vconn->state = (connect_status == EAGAIN ? VCS_CONNECTING > : !connect_status ? VCS_SEND_HELLO > : VCS_DISCONNECTED); > vconn->error = connect_status; > - vconn->version = 0; > vconn->allowed_versions = allowed_versions; > - vconn->remote_ip = 0; > - vconn->remote_port = 0; > - vconn->local_ip = 0; > - vconn->local_port = 0; > vconn->name = xstrdup(name); > ovs_assert(vconn->state != VCS_CONNECTING || class->connect); > } > -- > 1.7.2.5 > _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
