From 2586e3ba1e20603a87c833513e09dae9281beb4d Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Tue, 28 Apr 2015 15:25:49 -0400 Subject: [PATCH] pybind: fix valgrind warning on rbd_get_parent_info call Signed-off-by: Jason Dillaman --- src/pybind/rbd.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pybind/rbd.py b/src/pybind/rbd.py index 239104fe6fd7..28bff2f38b1a 100644 --- a/src/pybind/rbd.py +++ b/src/pybind/rbd.py @@ -488,9 +488,12 @@ class Image(object): pool = create_string_buffer(size) name = create_string_buffer(size) snapname = create_string_buffer(size) - ret = self.librbd.rbd_get_parent_info(self.image, pool, len(pool), - name, len(name), snapname, - len(snapname)) + ret = self.librbd.rbd_get_parent_info(self.image, byref(pool), + c_size_t(size), + byref(name), + c_size_t(size), + byref(snapname), + c_size_t(size)) if ret == -errno.ERANGE: size *= 2 -- 2.47.3