From: Hector Martin Date: Fri, 26 Feb 2016 10:05:24 +0000 (+0900) Subject: pybind/rbd: keep a ref to the Image in SnapIterator X-Git-Tag: v11.0.0~394^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c14c0ac02f67360caf77376915ccad4d7fc44dfa;p=ceph.git pybind/rbd: keep a ref to the Image in SnapIterator Signed-off-by: Hector Martin --- diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx index 92a708bd3083..e87faa5125b1 100644 --- a/src/pybind/rbd/rbd.pyx +++ b/src/pybind/rbd/rbd.pyx @@ -1942,8 +1942,10 @@ cdef class SnapIterator(object): cdef rbd_snap_info_t *snaps cdef int num_snaps + cdef object image def __init__(self, Image image): + self.image = image self.snaps = NULL self.num_snaps = 10 while True: