Skip to content

Commit

Permalink
[top] Fix bug in link counter deallocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Aug 3, 2015
1 parent b297c76 commit 026441c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/program/top/top.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down

0 comments on commit 026441c

Please sign in to comment.