From 70fa1ecbf4f013566734fc506f50d90ee570a3e0 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Thu, 12 Sep 2013 11:54:16 -0700 Subject: [PATCH] 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 --- vswitchd/bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } } -- 2.47.0