mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
cleanup: destroy connections after .Copy() an other one
Everytime a connection is copied with the .Copy() function, it needs to be destroyed once the object is not needed anymore. This was not done consistently, a few more locations require the freeing of the connection resources. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
4aa53c823e
commit
5a6556c4d4
@ -1662,6 +1662,7 @@ func (ri *rbdImage) flattenParent(ctx context.Context, hardLimit, softLimit uint
|
||||
if parentImage == nil {
|
||||
return nil
|
||||
}
|
||||
defer parentImage.Destroy()
|
||||
|
||||
return parentImage.flattenRbdImage(ctx, false, hardLimit, softLimit)
|
||||
}
|
||||
|
Reference in New Issue
Block a user