From cf3a8ad277b95daefaabaef88a1123d5e6984e38 Mon Sep 17 00:00:00 2001 From: songweibin Date: Mon, 10 Dec 2018 18:13:05 +0800 Subject: [PATCH] pybind/rbd: use the correct structure to calculate options size Signed-off-by: songweibin --- src/pybind/rbd/rbd.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx index 796046ba0cb..36bb7f37c07 100644 --- a/src/pybind/rbd/rbd.pyx +++ b/src/pybind/rbd/rbd.pyx @@ -2434,7 +2434,7 @@ cdef class ConfigPoolIterator(object): self.num_options = 32 while True: self.options = realloc_chk( - self.options, self.num_options * sizeof(rbd_mirror_peer_t)) + self.options, self.num_options * sizeof(rbd_config_option_t)) with nogil: ret = rbd_config_pool_list(_ioctx, self.options, &self.num_options) if ret < 0: @@ -4763,7 +4763,7 @@ cdef class ConfigImageIterator(object): self.num_options = 32 while True: self.options = realloc_chk( - self.options, self.num_options * sizeof(rbd_mirror_peer_t)) + self.options, self.num_options * sizeof(rbd_config_option_t)) with nogil: ret = rbd_config_image_list(image.image, self.options, &self.num_options) -- 2.39.5