1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

graphdriver: Fix RefCounter memory leak

Signed-off-by: WANG Chao <chao.wang@ucloud.cn>
This commit is contained in:
WANG Chao 2018-02-08 15:44:20 +08:00
parent 3a633a712c
commit 9015a05606

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
}