Merge pull request #36256 from wcwxyz/fix-refcounter-memory-leak

graphdriver: Fix RefCounter memory leak
Upstream-commit: 733ed2ddd3c621dadafbb74feb7b80d20fd3fd6f
Component: engine
This commit is contained in:
Tõnis Tiigi
2018-02-19 10:32:14 -08:00
committed by GitHub

View File

@ -54,6 +54,9 @@ func (c *RefCounter) incdec(path string, infoOp func(minfo *minfo)) int {
}
infoOp(m)
count := m.count
if count <= 0 {
delete(c.counts, path)
}
c.mu.Unlock()
return count
}