graphdriver: Fix RefCounter memory leak

Signed-off-by: WANG Chao <chao.wang@ucloud.cn>
Upstream-commit: 9015a05606a9bb80f0d8d2e3d43b0b682ca53db4
Component: engine
This commit is contained in:
WANG Chao
2018-02-09 10:26:06 +08:00
parent fd90b16ff5
commit f74751654b
@@ -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
}