]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind: fix valgrind warning on rbd_get_parent_info call 4461/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 28 Apr 2015 19:25:49 +0000 (15:25 -0400)
committerjdillaman <jdillaman@ubuntu.(none)>
Thu, 30 Apr 2015 14:56:55 +0000 (10:56 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/pybind/rbd.py

index 239104fe6fd700f525d99bb0a263382b1b0e92a0..28bff2f38b1a6343050695239ecc14a0eb0526fa 100644 (file)
@@ -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