From: Ben Pfaff Date: Mon, 29 Dec 2008 21:30:48 +0000 (-0800) Subject: vswitchd: Fix svec memory leaks. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50157bf4cf44719fdd5262ac6e2982a8a8533ae1;p=openvswitch vswitchd: Fix svec memory leaks. Pointed out by Justin. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 32016b25..07067adb 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -238,6 +238,8 @@ bridge_reconfigure(void) bridge_create(name); } } + svec_destroy(&old_br); + svec_destroy(&new_br); /* Reconfigure all bridges. */ LIST_FOR_EACH (br, struct bridge, node, &all_bridges) { @@ -519,6 +521,7 @@ start_secchan(struct bridge *br) /* Start secchan. */ retval = process_start(argv.names, &sockets[1], 1, &br->secchan); + svec_destroy(&argv); close(sockets[1]); if (retval) { VLOG_ERR("%s: failed to start secchan for datapath nl:%d: %s", @@ -719,6 +722,8 @@ bridge_reconfigure_one(struct bridge *br) port_create(br, name); } } + svec_destroy(&old_ports); + svec_destroy(&new_ports); /* Reconfigure all ports. */ for (i = 0; i < br->n_ports; i++) { @@ -2047,6 +2052,8 @@ port_reconfigure(struct port *port) port->name); } } + svec_destroy(&old_ifaces); + svec_destroy(&new_ifaces); } static void