From 0a6f55420508c31af9fe41aafdd26ce8462cc1be Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 7 Feb 2011 12:46:25 -0800 Subject: [PATCH] ofproto: Clear out entire 'name' field of ofp_phy_port when initializing. Sometimes garbage could appear in the name field following the port name, since it wasn't completely zeroed. Reported-by: kk yap Tested-by: kk yap --- ofproto/ofproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 82008be1..e0f1b663 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1567,7 +1567,7 @@ make_ofport(const struct dpif_port *dpif_port) return NULL; } - ofport = xmalloc(sizeof *ofport); + ofport = xzalloc(sizeof *ofport); ofport->netdev = netdev; ofport->odp_port = dpif_port->port_no; ofport->opp.port_no = odp_port_to_ofp_port(dpif_port->port_no); -- 2.30.2