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:
parent
3a633a712c
commit
9015a05606
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue