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
}