diff options
author | Justin Pettit <jpettit@nicira.com> | 2009-06-10 13:00:10 -0700 |
---|---|---|
committer | Justin Pettit <jpettit@nicira.com> | 2009-06-10 17:10:54 -0700 |
commit | 2f14f69319cd69d1334777fd6cf59ca75951327a (patch) | |
tree | c8d9bfc26fed32fd20a5ccf441f30507e9341125 /vswitchd/mgmt.c | |
parent | d138cd2c0972990dfd58021f11cd877c475a1303 (diff) |
vswitch: Fix memory leak when OFMP resource updates are sent
When a resource update message is generated by vSwitch, it creates a
couple of svec objects that need to be explicitly destroyed. This
wasn't happening, so memory would leak after each resource update. This
commit properly destroys them after use.
Diffstat (limited to 'vswitchd/mgmt.c')
-rw-r--r-- | vswitchd/mgmt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vswitchd/mgmt.c b/vswitchd/mgmt.c index 90f3ecb6..f42f679c 100644 --- a/vswitchd/mgmt.c +++ b/vswitchd/mgmt.c @@ -381,6 +381,7 @@ send_resources_update(uint32_t xid, bool use_xid) } } } + svec_destroy(&br_list); /* On XenServer systems, extended information about virtual interfaces * (VIFs) is available, which is needed by the controller. @@ -423,6 +424,7 @@ send_resources_update(uint32_t xid, bool use_xid) vif_mac = cfg_get_mac(0, "port.%s.vif-mac", port_list.names[i]); vif_tlv->vif_mac = htonll(vif_mac); } + svec_destroy(&port_list); /* Put end marker. */ tlv = ofpbuf_put_zeros(buffer, sizeof(*tlv)); |