From 026441ccc107d8754abb3971fc89e1784ccb1b11 Mon Sep 17 00:00:00 2001 From: Max Rottenkolber Date: Mon, 3 Aug 2015 17:07:25 +0200 Subject: [PATCH] [top] Fix bug in link counter deallocation. --- src/program/top/top.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/program/top/top.lua b/src/program/top/top.lua index b76b4cf529..36f31d57c5 100644 --- a/src/program/top/top.lua +++ b/src/program/top/top.lua @@ -73,10 +73,10 @@ end function open_link_counters (counters, tree) -- Unmap and clear existing link counters. - for _, link in ipairs(counters.links) do - for _, counter + for linkspec, _ in pairs(counters.links) do + for _, name in ipairs({"rxpackets", "txpackets", "rxbytes", "txbytes", "txdrop"}) do - shm.unmap(counters.links[counter]) + counter.delete(tree.."/counters/"..linkspec.."/"..name) end end counters.links = {}