mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
cleanup: release resources for rbdImages objects after use
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
dc990037a5
commit
b5d0524c39
@ -46,7 +46,10 @@ import (
|
|||||||
func (rv *rbdVolume) checkCloneImage(ctx context.Context, parentVol *rbdVolume) (bool, error) {
|
func (rv *rbdVolume) checkCloneImage(ctx context.Context, parentVol *rbdVolume) (bool, error) {
|
||||||
// generate temp cloned volume
|
// generate temp cloned volume
|
||||||
tempClone := rv.generateTempClone()
|
tempClone := rv.generateTempClone()
|
||||||
|
defer tempClone.Destroy()
|
||||||
|
|
||||||
snap := &rbdSnapshot{}
|
snap := &rbdSnapshot{}
|
||||||
|
defer snap.Destroy()
|
||||||
snap.RbdSnapName = rv.RbdImageName
|
snap.RbdSnapName = rv.RbdImageName
|
||||||
snap.Pool = rv.Pool
|
snap.Pool = rv.Pool
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user