From: Alex Wang Date: Thu, 12 Sep 2013 18:54:16 +0000 (-0700) Subject: bridge: Always call smap_destroy() after smap_init() X-Git-Tag: sliver-openvswitch-2.0.90-1~14^2~37 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=70fa1ecbf4f013566734fc506f50d90ee570a3e0;p=sliver-openvswitch.git bridge: Always call smap_destroy() after smap_init() This commit fixes a place in bridge.c where smap_destroy() is not always called after smap_init(). Though there is no memory leak now, it is necessary to fix it and prevent memory leak in the future when smap_init() may be modified to allocate dynamic memory. Reported-by: Ansis Atteka Signed-off-by: Alex Wang Signed-off-by: Ben Pfaff --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 5e54e0bf3..2dc552966 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2262,8 +2262,8 @@ instant_stats_run(void) if (!ofproto_port_get_bfd_status(br->ofproto, iface->ofp_port, &smap)) { ovsrec_interface_set_bfd_status(iface->cfg, &smap); - smap_destroy(&smap); } + smap_destroy(&smap); } } }